From a5c3bc430c8d2f9781366cc8694ba98cbe06358c Mon Sep 17 00:00:00 2001 From: zicodxx Date: Thu, 10 Feb 2011 18:56:33 +0100 Subject: [PATCH] Fixed compiler warning related to generation of game_id for Coop Savegames --- CHANGELOG.txt | 1 + main/multi.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8d6009128..9be53d525 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ D2X-Rebirth Changelog -------- main/automap.c, main/gauges.c, main/gauges.h, main/kconfig.c, main/newmenu.c, main/newmenu.h: Fixed broken FlightSim indicator on Automap; Fixed Assert for using mouse buttons in kconfig (which can react to UP and DOWN states); Added scrolling support for menus flagged tiny_mode and all_text arch/ogl/gr.c, arch/sdl/gr.c, d2x.ini, include/args.h, main/inferno.c, misc/args.c: Simplified ogl version of gr.c in terms of SDL video flags and fullscreen toggle; Added command-line/INI option to remove borders from windowed program +main/multi.c: Fixed compiler warning related to generation of game_id for Coop Savegames 20110209 -------- diff --git a/main/multi.c b/main/multi.c index 4ef3f57ee..27318d14c 100644 --- a/main/multi.c +++ b/main/multi.c @@ -5030,7 +5030,11 @@ void multi_initiate_save_game() game_id = ((fix)timer_query()); game_id ^= N_players<<4; for (i = 0; i < N_players; i++ ) - game_id ^= *(fix *)Players[i].callsign; + { + fix call2i; + memcpy(&call2i, Players[i].callsign, sizeof(fix)); + game_id ^= call2i; + } if ( game_id == 0 ) game_id = 1; // 0 is invalid