From be5e19d2bd3011128b12e8dfd4897b3514760941 Mon Sep 17 00:00:00 2001 From: xalduin Date: Mon, 7 Jun 2010 09:38:38 +0800 Subject: [PATCH] Fixed some compiler warnings --- src/engine/server/server.cpp | 4 ++-- src/game/client/components/menus_demo.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 620599c87..bd5bebe1b 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -554,9 +554,9 @@ void CServer::SendMap(int ClientId) { //get the name of the map without his path char * pMapShortName = &g_Config.m_SvMap[0]; - for(int i = 0; i < 128; i++) + for(int i = 0; i < 127; i++) { - if(g_Config.m_SvMap[i] == '/' || g_Config.m_SvMap[i] == '\\' && i+1 < 128) + if(g_Config.m_SvMap[i] == '/' || g_Config.m_SvMap[i] == '\\') pMapShortName = &g_Config.m_SvMap[i+1]; } diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index ec1ead8e3..fd0caf621 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -519,6 +519,6 @@ void CMenus::DemoSetParentDirectory() for(i = 0; i < 256; i++) { if(i >= Stop) - m_aCurrentDemoFolder[i] = NULL; + m_aCurrentDemoFolder[i] = 0; } }