GBA: Zero DebugString buffer when handling messages

This commit is contained in:
Thomas Winwood 2018-08-06 00:24:15 +01:00 committed by Vicki Pfau
parent bb82579d6a
commit 05f1e980cb
1 changed files with 1 additions and 0 deletions

View File

@ -471,6 +471,7 @@ void GBADebug(struct GBA* gba, uint16_t flags) {
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);
}