r7364 failed to expand a malloc to match the larger data being put

in it.

[originally from svn r7387]
[r7364 == 39d299f579da3e91308d63acc78c68ab74666989]
This commit is contained in:
Simon Tatham
2007-03-11 10:39:44 +00:00
parent f7e755628b
commit 67b37596c2

View File

@ -1659,7 +1659,7 @@ static frontend *new_window(HINSTANCE inst, char *game_id, char **error)
if (help_topic) { if (help_topic) {
char *item; char *item;
assert(thegame.name); assert(thegame.name);
item = snewn(9+strlen(thegame.name), char); /*ick*/ item = snewn(10+strlen(thegame.name), char); /*ick*/
sprintf(item, "&Help on %s", thegame.name); sprintf(item, "&Help on %s", thegame.name);
AppendMenu(menu, MF_ENABLED, IDM_GAMEHELP, item); AppendMenu(menu, MF_ENABLED, IDM_GAMEHELP, item);
sfree(item); sfree(item);