From 178ec7eb1863efb8a446b44bd596a400af546084 Mon Sep 17 00:00:00 2001 From: auria Date: Fri, 20 Jul 2012 01:14:16 +0000 Subject: [PATCH] Apply patch by nathanm32292394 git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11407 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/main.cpp | 4 ++-- src/race/history.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3daf2ae92..e883600f7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -682,7 +682,7 @@ int handleCmdLine(int argc, char **argv) { UserConfigParams::m_server_port=n; } - else if( sscanf(argv[i], "--client=%s", s) ) + else if( sscanf(argv[i], "--client=%1023s", s) ) { network_manager->setMode(NetworkManager::NW_CLIENT); UserConfigParams::m_server_address=s; @@ -759,7 +759,7 @@ int handleCmdLine(int argc, char **argv) } */ } - else if( sscanf(argv[i], "--ai=%s", s)==1) + else if( sscanf(argv[i], "--ai=%1023s", s)==1) { const std::vector l= StringUtils::split(std::string(s),','); diff --git a/src/race/history.cpp b/src/race/history.cpp index aa4d91a73..ac415f489 100644 --- a/src/race/history.cpp +++ b/src/race/history.cpp @@ -249,7 +249,7 @@ void History::Load() exit(-2); } - if (sscanf(s,"Version: %s",s1)!=1) + if (sscanf(s,"Version: %1023s",s1)!=1) { fprintf(stderr, "ERROR: no Version information found in history file (bogus history file)\n"); exit(-2); @@ -294,7 +294,7 @@ void History::Load() race_manager->setDifficulty((RaceManager::Difficulty)n); fgets(s, 1023, fd); - if(sscanf(s, "track: %s",s1)!=1) + if(sscanf(s, "track: %1023s",s1)!=1) { fprintf(stderr,"WARNING: Track not found in history file.\n"); } @@ -306,7 +306,7 @@ void History::Load() for(unsigned int i=0; i