[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp |
Date: |
Fri, 05 Sep 2003 20:59:12 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/09/05 20:59:11
Modified files:
src/NetPanzer/Interfaces: GameManager.cpp
Log message:
changed some gets calls to fgets to silence gcc warnings about security
issues
Patches:
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.6
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.7
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.6 Fri Sep 5
19:01:50 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp Fri Sep 5 20:59:10 2003
@@ -455,7 +455,6 @@
setupKeyboardBindings();
MouseInterface::initialize();
- MouseInterface::hideHardwareCursor();
mouse.setPointer(&mouseArrow);
}
@@ -1448,9 +1447,6 @@
const int yOffset = 20;
iXY pos(0, 140);
- // FUCK YOU HARDWARE CURSOR!!!
- MouseInterface::hideHardwareCursor();
-
{
FRAME_BUFFER.lock();
@@ -1675,13 +1671,13 @@
printf( "Map Name <%s> : ", GameConfig::getGameMapName() );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strlen(input_str) > 0 )
{ GameConfig::setGameMapName( input_str ); }
printf( "Players <%d> : ", GameConfig::GetNumberPlayers() );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strlen(input_str) > 0 )
{
short players;
@@ -1691,7 +1687,7 @@
printf( "Units <%d> : ", GameConfig::GetNumberUnits() );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strlen(input_str) > 0 )
{
short units;
@@ -1709,7 +1705,7 @@
printf( "(3) Time Limit \n" );
printf( "Choose : " );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
sscanf( input_str, "%d", &game_type );
} while( (game_type < 1) && (game_type > 3) );
@@ -1720,7 +1716,7 @@
GameConfig::SetGameType(_gametype_objective);
printf( "Outpost Occupation <%.0f %%> : ",
GameConfig::getObjectiveOccuapationPercentage() );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strlen(input_str) > 0 )
{
float percent;
@@ -1734,7 +1730,7 @@
GameConfig::SetGameType(_gametype_fraglimit);
printf( "Frag Limit <%d> frags : ", GameConfig::GetFragLimit() );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strlen(input_str) > 0 )
{
int frags;
@@ -1748,7 +1744,7 @@
GameConfig::SetGameType(_gametype_timelimit);
printf( "Time Limit <%d> minutes: ", GameConfig::GetTimeLimit() );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strlen(input_str) > 0 )
{
int time_limit;
@@ -1761,13 +1757,13 @@
printf( "PowerUps <NO> (Y/N) : " );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strcasecmp( "y", input_str ) == 0 )
{ GameConfig::setPowerUpState(true); }
printf( "Server Name <Dedicated Server> :" );
fflush(stdout);
- gets( input_str );
+ fgets(input_str, sizeof(input_str), stdin);
if ( strlen(input_str) > 0 )
{ GameConfig::SetPlayerName( input_str ); }
else
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp,
Matthias Braun <=
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp, Matthias Braun, 2003/09/06
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp, Matthias Braun, 2003/09/08
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp, Matthias Braun, 2003/09/11
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp, Matthias Braun, 2003/09/13
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp, Matthias Braun, 2003/09/23
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp, Ivo Danihelka, 2003/09/23
- [netPanzer-CVS] netpanzer/src/NetPanzer/Interfaces GameManager.cpp, Ivo Danihelka, 2003/09/23