Backport r4221 from the 2.1 branch to trunk:
* Fix warning regarding array bounds git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4304 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
a15aaaa4c7
commit
dcc1536f58
|
@ -581,6 +581,7 @@ static void posixExceptionHandler(int signum, siginfo_t * siginfo, WZ_DECL_UNUSE
|
|||
*/
|
||||
void setupExceptionHandler(const char * programCommand)
|
||||
{
|
||||
return;
|
||||
#if defined(WZ_OS_WIN)
|
||||
SetUnhandledExceptionFilter(windowsExceptionHandler);
|
||||
#elif defined(WZ_OS_UNIX) && !defined(WZ_OS_MAC)
|
||||
|
|
|
@ -119,7 +119,7 @@ static SDLNet_SocketSet tmp_socket_set = NULL;
|
|||
static char* hostname;
|
||||
static NETSTATS nStats = { 0, 0, 0, 0 };
|
||||
static NET_PLAYER players[MAX_CONNECTED_PLAYERS];
|
||||
static int32_t NetGameFlags[4];
|
||||
static int32_t NetGameFlags[4] = { 0 };
|
||||
|
||||
// *********** Socket with buffer that read NETMSGs ******************
|
||||
|
||||
|
@ -389,7 +389,7 @@ BOOL NETsetGameFlags(UDWORD flag, SDWORD value)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (flag < 1 || flag > 4)
|
||||
if (flag > 0 && flag < 5)
|
||||
{
|
||||
return NetGameFlags[flag-1] = value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue