diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-19 19:34:33 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-19 19:34:33 +0100 |
commit | e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec (patch) | |
tree | e125a108afc4ed570d1ecb8775cbf30adc1eb421 /lib/tolua++/src/bin/lua | |
parent | Fixed =~ bug (diff) | |
download | cuberite-e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec.tar cuberite-e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec.tar.gz cuberite-e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec.tar.bz2 cuberite-e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec.tar.lz cuberite-e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec.tar.xz cuberite-e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec.tar.zst cuberite-e8f7c18ba75be4e62b9b0b7f55c5fe8eae1af1ec.zip |
Diffstat (limited to 'lib/tolua++/src/bin/lua')
-rw-r--r-- | lib/tolua++/src/bin/lua/enumerate.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tolua++/src/bin/lua/enumerate.lua b/lib/tolua++/src/bin/lua/enumerate.lua index 9c534a020..a00b434aa 100644 --- a/lib/tolua++/src/bin/lua/enumerate.lua +++ b/lib/tolua++/src/bin/lua/enumerate.lua @@ -54,11 +54,11 @@ _global_output_enums = {} function classEnumerate:supcode () if _global_output_enums[self.name] == nil then _global_output_enums[self.name] = 1 - output("int tolua_is" .. self.name .. " (lua_State* L, int lo, int def, tolua_Error* err)") + output("lua_Number tolua_is" .. self.name .. " (lua_State* L, int lo, int def, tolua_Error* err)") output("{") output("if (!tolua_isnumber(L,lo,def,err)) return 0;") - output("int val = tolua_tonumber(L,lo,def);") - output("return val >= " .. self.min .. " && val <= " ..self.max .. ";") + output("lua_Number val = tolua_tonumber(L,lo,def);") + output("return val >= " .. self.min .. ".0 && val <= " ..self.max .. ".0;") output("}") end end |