When calling do_game_pause do not allocate msg in Game mod GM_MULTI as it's not used nor freed

This commit is contained in:
zicodxx 2010-12-04 16:51:40 +01:00
parent f4ec76d74d
commit 970fd72eae
2 changed files with 5 additions and 4 deletions

View file

@ -3,6 +3,7 @@ D1X-Rebirth Changelog
20101204
--------
main/bmread.c, main/piggy.c: When setting a bogus sound in gamedata_read_tbl, don't let piggy_close free it. Fixes freeing of non-malloc'd pointer for PC shareware data
main/gamecntl.c: When calling do_game_pause do not allocate msg in Game mod GM_MULTI as it's not used nor freed
20101203
--------

View file

@ -280,10 +280,6 @@ int do_game_pause()
char *msg;
char total_time[9],level_time[9];
MALLOC(msg, char, 1024);
if (!msg)
return 0;
#ifdef NETWORK
if (Game_mode & GM_MULTI)
{
@ -292,6 +288,10 @@ int do_game_pause()
}
#endif
MALLOC(msg, char, 1024);
if (!msg)
return 0;
songs_pause();
format_time(total_time, f2i(Players[Player_num].time_total) + Players[Player_num].hours_total*3600);