Use buffer size aware string func variants

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3351 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2009-11-25 11:55:19 +00:00
parent 76abf75aaa
commit 7dde9add97
+6 -2
View File
@@ -1041,14 +1041,18 @@ ChangeGameSelection:
t.baseline.x = r.corner.x + 3;
if (((SUMMARY_DESC *)pMS->Extra)[NewState - SHIFT + i].year_index == 0)
sprintf (buf, "%s", GAME_STRING (SAVEGAME_STRING_BASE + 3)); // "Empty Slot"
{
utf8StringCopy (buf, sizeof buf,
GAME_STRING (SAVEGAME_STRING_BASE + 3)); // "Empty Slot"
}
else
{
DateToString (buf2, sizeof buf2,
((SUMMARY_DESC *)pMS->Extra)[NewState - SHIFT + i].month_index,
((SUMMARY_DESC *)pMS->Extra)[NewState - SHIFT + i].day_index,
((SUMMARY_DESC *)pMS->Extra)[NewState - SHIFT + i].year_index);
sprintf (buf, "%s %s", GAME_STRING (SAVEGAME_STRING_BASE + 4), buf2); // "Saved Game - Date:"
snprintf (buf, sizeof buf, "%s %s",
GAME_STRING (SAVEGAME_STRING_BASE + 4), buf2); // "Saved Game - Date:"
}
font_DrawText (&t);
}