Game -v and -l cmdline opts: cast the numbers to unsigned first for paranoia.

git-svn-id: https://svn.eduke32.com/eduke32@3502 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-02-18 16:07:45 +00:00
parent 185f0a8cc4
commit 2264331daf

View file

@ -9104,7 +9104,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
case 'l': case 'l':
ud.warp_on = 1; ud.warp_on = 1;
c++; c++;
ud.m_level_number = ud.level_number = (Batoi(c)-1)%MAXLEVELS; ud.m_level_number = ud.level_number = ((unsigned)(Batoi(c)-1))%MAXLEVELS;
break; break;
case 'm': case 'm':
if (*(c+1) != 'a' && *(c+1) != 'A') if (*(c+1) != 'a' && *(c+1) != 'A')
@ -9226,7 +9226,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
case 'v': case 'v':
c++; c++;
ud.warp_on = 1; ud.warp_on = 1;
ud.m_volume_number = ud.volume_number = (Batoi(c)-1)%MAXVOLUMES; ud.m_volume_number = ud.volume_number = ((unsigned)(Batoi(c)-1))%MAXVOLUMES;
break; break;
case 'w': case 'w':
ud.coords = 1; ud.coords = 1;