Apply patch by nathanm32292394
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11407 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c380c80358
commit
178ec7eb18
@ -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<std::string> l=
|
||||
StringUtils::split(std::string(s),',');
|
||||
|
@ -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<num_karts; i++)
|
||||
{
|
||||
fgets(s, 1023, fd);
|
||||
if(sscanf(s, "model %d: %s",&n, s1)!=2)
|
||||
if(sscanf(s, "model %d: %1023s",&n, s1)!=2)
|
||||
{
|
||||
fprintf(stderr,"WARNING: No model information for kart %d found.\n",
|
||||
i);
|
||||
|
Loading…
Reference in New Issue
Block a user