Skip to content

Commit

Permalink
fix crash with sim.floodWalls(1,1,4,0)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Sep 29, 2015
1 parent 1f7b6a6 commit 9c44fc6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lua/LuaScriptInterface.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 9c44fc6

Please sign in to comment.