Fix further issues

This commit is contained in:
Tobias Markus 2014-11-20 23:15:05 +01:00
parent 416c97bf0e
commit 22c22b864a
2 changed files with 5 additions and 5 deletions

View File

@ -253,7 +253,7 @@ void History::Load()
Log::fatal("History", "Could not read history.dat.");
unsigned int num_karts;
if(sscanf(s, "numkarts: %d",(int) &num_karts)!=1)
if(sscanf(s, "numkarts: %d",(int*) &num_karts)!=1)
Log::fatal("History", "No number of karts found in history file.");
race_manager->setNumKarts(num_karts);

View File

@ -100,7 +100,7 @@ void ReplayPlay::Load()
Log::fatal("Replay", "Could not read '%s'.", getReplayFilename().c_str());
unsigned int version;
if (sscanf(s,"Version: %d", (int*)&version) != 1)
if (sscanf(s,"Version: %u", &version) != 1)
Log::fatal("Replay", "No Version information found in replay file (bogus replay file).");
if (version != getReplayVersion())
@ -130,7 +130,7 @@ void ReplayPlay::Load()
unsigned int num_laps;
fgets(s, 1023, fd);
if(sscanf(s, "Laps: %d", (int*)&num_laps) != 1)
if(sscanf(s, "Laps: %u", &num_laps) != 1)
Log::fatal("Replay", "No number of laps found in replay file.");
race_manager->setNumLaps(num_laps);
@ -164,7 +164,7 @@ void ReplayPlay::readKartData(FILE *fd, char *next_line)
fgets(s, 1023, fd);
unsigned int size;
if(sscanf(s,"size: %d",(int*)&size)!=1)
if(sscanf(s,"size: %u",&size)!=1)
Log::fatal("Replay", "Number of records not found in replay file "
"for kart %d.",
m_ghost_karts.size()-1);
@ -198,7 +198,7 @@ void ReplayPlay::readKartData(FILE *fd, char *next_line)
} // for i
fgets(s, 1023, fd);
unsigned int num_events;
if(sscanf(s,"events: %d",(int*)&num_events)!=1)
if(sscanf(s,"events: %u",&num_events)!=1)
Log::warn("Replay", "Number of events not found in replay file "
"for kart %d.", m_ghost_karts.size()-1);