diff --git a/src/scripting/lua/core.c b/src/scripting/lua/core.c index 4732cfcc..2926a35c 100644 --- a/src/scripting/lua/core.c +++ b/src/scripting/lua/core.c @@ -508,13 +508,15 @@ l_set_option(LS) option_types[opt->type].set(opt, (unsigned char *) (&value)); break; } - case OPT_INT: + { + int value = lua_tonumber(S, 2); + option_types[opt->type].set(opt, (unsigned char *) (&value)); + break; + } case OPT_LONG: { - int value; - - value = lua_tonumber(S, 2); + long value = lua_tonumber(S, 2); option_types[opt->type].set(opt, (unsigned char *) (&value)); break; }