mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user