Add a bugfix for unsafe usage of sprintf
Thanks, Gabe
This commit is contained in:
parent
d1c7cd53df
commit
941dec2c7c
1 changed files with 5 additions and 1 deletions
|
@ -1310,7 +1310,11 @@ int TextScriptProc()
|
|||
|
||||
//Print text
|
||||
PutText2(0, 0, str, RGB(0xFF, 0xFF, 0xFE), (Surface_Ids)(gTS.line % 4 + SURFACE_ID_TEXT_LINE1));
|
||||
sprintf(&text[gTS.line % 4 * 0x40], str);
|
||||
#ifdef FIX_BUGS
|
||||
strcpy(&text[gTS.line % 4 * 0x40], str);
|
||||
#else
|
||||
sprintf(&text[gTS.line % 4 * 0x40], str); // No point to using an sprintf here, and it makes Clang mad
|
||||
#endif
|
||||
|
||||
//Check if should move to next line (prevent a memory overflow, come on guys, this isn't a leftover of pixel trying to make text wrapping)
|
||||
gTS.p_read += y;
|
||||
|
|
Loading…
Add table
Reference in a new issue