Fix: UB cannot be compiled

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8167 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-04-22 20:03:32 +00:00
parent 92314bfbfb
commit 1b8a368108
2 changed files with 32 additions and 26 deletions
+3 -2
View File
@@ -2211,13 +2211,14 @@ INT16 sSectorY;
static int l_SetNumberJa25EnemiesInSurfaceSector(lua_State *L)
{
UINT8 n = lua_gettop(L);
UINT8 n = lua_gettop(L);
int i;
UINT8 ubNumAdmins=0;
UINT8 ubNumTroops=0;
UINT8 ubNumElites=0;
UINT8 ubNumTanks=0;
UINT8 ubNumJeeps=0;
INT16 sSectorX;
INT16 sSectorY;
@@ -2231,7 +2232,7 @@ INT16 sSectorY;
if (i == 5 ) ubNumElites = lua_tointeger(L,i);
if (i == 6 ) ubNumTanks = lua_tointeger(L,i);
}
SetNumberJa25EnemiesInSurfaceSector( SECTOR( sSectorX, sSectorY ), ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks );
SetNumberJa25EnemiesInSurfaceSector( SECTOR( sSectorX, sSectorY ), ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks, ubNumJeeps );
return 0;
}