diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-01 08:59:33 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-01 08:59:33 (GMT) |
| commit | 8dfa09bf6a4a4e30e6e26b6af4eb9b0c275c0d56 (patch) | |
| tree | 7c86539adc5da4db672798f31e0b160a58b63794 /src | |
| parent | 89e47bfa4dbad13cdf6074f0b12820335b19cdbd (diff) | |
| download | powder-8dfa09bf6a4a4e30e6e26b6af4eb9b0c275c0d56.zip powder-8dfa09bf6a4a4e30e6e26b6af4eb9b0c275c0d56.tar.gz | |
Edited src/luaconsole.c via GitHub
Diffstat (limited to 'src')
| -rw-r--r-- | src/luaconsole.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c index 4c76f71..8dce665 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -857,7 +857,10 @@ int luatpt_active_menu(lua_State* l) { int aheatstate; aheatstate = luaL_optint(l, 1, menu_count); - active_menu = aheatstate; + if (aheatstate < SC_TOTAL) + active_menu = aheatstate; + else + return luaL_error(l, "Menu does not exist"); return 0; } int luatpt_decorations_enable(lua_State* l) |
