summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-08-05 11:16:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-06 10:13:22 (GMT)
commit39e1ffe5bf64c29e81ecf8779dfbbe41bb5173d5 (patch)
treee001e996b4b41181e07aea1cbd65c68d2902b0db /src
parent75d7853a74bf3a4363a213c1387b809b3a545a1d (diff)
downloadpowder-39e1ffe5bf64c29e81ecf8779dfbbe41bb5173d5.zip
powder-39e1ffe5bf64c29e81ecf8779dfbbe41bb5173d5.tar.gz
0 is a valid menu number (walls)
Diffstat (limited to 'src')
-rw-r--r--src/luaconsole.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c
index b0c234d..dac25ea 100644
--- a/src/luaconsole.c
+++ b/src/luaconsole.c
@@ -1011,8 +1011,8 @@ int luatpt_airheat(lua_State* l)
int luatpt_active_menu(lua_State* l)
{
int menuid;
- menuid = luaL_optint(l, 1, 0);
- if (menuid < SC_TOTAL && menuid > 0)
+ menuid = luaL_optint(l, 1, -1);
+ if (menuid < SC_TOTAL && menuid >= 0)
active_menu = menuid;
else
return luaL_error(l, "Invalid menu");