diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-08-05 13:54:04 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-08-05 13:54:04 +0200 |
commit | 43de9af8786243c90832b78f8c19ec92fb218392 (patch) | |
tree | ec16482b225676c629401c0769d25dd31ffac1c2 /src/Bindings | |
parent | Added Clamp() function to the lua api. (diff) | |
download | cuberite-43de9af8786243c90832b78f8c19ec92fb218392.tar cuberite-43de9af8786243c90832b78f8c19ec92fb218392.tar.gz cuberite-43de9af8786243c90832b78f8c19ec92fb218392.tar.bz2 cuberite-43de9af8786243c90832b78f8c19ec92fb218392.tar.lz cuberite-43de9af8786243c90832b78f8c19ec92fb218392.tar.xz cuberite-43de9af8786243c90832b78f8c19ec92fb218392.tar.zst cuberite-43de9af8786243c90832b78f8c19ec92fb218392.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index b41cd94bc..81065a7e1 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -96,8 +96,8 @@ static int tolua_Clamp(lua_State * tolua_S) return lua_do_error(LuaState, "Error in function call '#funcname#': Expected a number for parameters #1, #2 and #3"); } - int Min = (int)tolua_tonumber(LuaState, 1, 0); - int Number = (int)tolua_tonumber(LuaState, 2, 0); + int Number = (int)tolua_tonumber(LuaState, 1, 0); + int Min = (int)tolua_tonumber(LuaState, 2, 0); int Max = (int)tolua_tonumber(LuaState, 3, 0); int Result = std::min(std::max(Min, Number), Max); |