all repos — mgba @ 1fb4d2be4dacbf68e1506f78fd3eb77c3aae40e4

mGBA Game Boy Advance Emulator

GBA: Zero DebugString buffer when handling messages
Thomas Winwood twwinwood@gmail.com
Mon, 06 Aug 2018 00:24:15 +0100
commit

1fb4d2be4dacbf68e1506f78fd3eb77c3aae40e4

parent

54cb257b3ffa537964b8d6812bbcc965c291ac1c

1 files changed, 1 insertions(+), 0 deletions(-)

jump to
M src/gba/gba.csrc/gba/gba.c

@@ -525,6 +525,7 @@ int level = 1 << GBADebugFlagsGetLevel(gba->debugFlags);

level &= 0x1F; char oolBuf[0x101]; strncpy(oolBuf, gba->debugString, sizeof(gba->debugString)); + memset(gba->debugString, 0, sizeof(gba->debugString)); oolBuf[0x100] = '\0'; mLog(_mLOG_CAT_GBA_DEBUG(), level, "%s", oolBuf); }