diff --git a/src/gba/gba.c b/src/gba/gba.c index e902c4e73..b660c76ca 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -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); }