Project64-core: Fix undefined behavior in CPifRam::LogControllerPakData

Signed-off-by: Francois Berder <fberder@outlook.fr>
This commit is contained in:
Francois Berder 2019-03-27 09:40:37 +00:00
parent f2e6199fcb
commit da37c46cbc
1 changed files with 3 additions and 1 deletions

View File

@ -643,7 +643,9 @@ void CPifRam::LogControllerPakData(const char * Description)
}
else
{
sprintf(Addon, "%s%c", Addon, PIF_Ram[(count << 2) + count2]);
char tmp[2];
sprintf(tmp, "%c", PIF_Ram[(count << 2) + count2]);
strcat(Addon, tmp);
}
}
strcat(AsciiData, Addon);