Permalink
Browse files

fix crash with sim.floodWalls(1,1,4,0)

  • Loading branch information...
jacob1 committed Sep 29, 2015
1 parent 1f7b6a6 commit 9c44fc641ceda03cc2161a47726b96b41a0ed5ba
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/lua/LuaScriptInterface.cpp
@@ -1378,6 +1378,11 @@ int LuaScriptInterface::simulation_floodWalls(lua_State * l)
int bm = luaL_optint(l,4,-1);
if (c < 0 || c >= UI_WALLCOUNT)
return luaL_error(l, "Unrecognised wall id '%d'", c);
if (c == WL_STREAM)
{
lua_pushinteger(l, 0);
return 1;
}
int ret = luacon_sim->FloodWalls(x, y, c, bm);
lua_pushinteger(l, ret);
return 1;

0 comments on commit 9c44fc6

Please sign in to comment.