From cb00194c49deff8d835b389576b944a00c1eafab Mon Sep 17 00:00:00 2001 From: d0k3 Date: Wed, 17 Jan 2018 01:06:48 +0100 Subject: [PATCH] Hexviewer: don't read more data than required --- arm9/source/godmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm9/source/godmode.c b/arm9/source/godmode.c index 57dd0bf..d448158 100644 --- a/arm9/source/godmode.c +++ b/arm9/source/godmode.c @@ -391,7 +391,7 @@ u32 SdFormatMenu(void) { } u32 FileHexViewer(const char* path) { - static const u32 max_data = (SCREEN_HEIGHT / 8) * 16 * 4; + const u32 max_data = (SCREEN_HEIGHT / FONT_HEIGHT_EXT) * 16 * ((FONT_WIDTH_EXT > 4) ? 1 : 2); static u32 mode = 0; u8* data = TEMP_BUFFER; u8* bottom_cpy = TEMP_BUFFER + 0xC0000; // a copy of the bottom screen framebuffer