diff options
author | Foghrye4 <foghrye4@gmail.com> | 2016-10-23 20:45:25 +0300 |
---|---|---|
committer | Ner'zhul <nerzhul@users.noreply.github.com> | 2016-10-25 21:10:51 +0200 |
commit | 6eb6e75fff91f86d0e59d337f12ec93fcf9dc46e (patch) | |
tree | 0b4c4447bf0ad8acd7aa18bff5eee82c852e8186 /src/script/lua_api | |
parent | 3db2f08ff95a2e1366b9b5079100b6a681f1e562 (diff) | |
download | minetest-6eb6e75fff91f86d0e59d337f12ec93fcf9dc46e.tar.gz minetest-6eb6e75fff91f86d0e59d337f12ec93fcf9dc46e.tar.bz2 minetest-6eb6e75fff91f86d0e59d337f12ec93fcf9dc46e.zip |
Adding LuaError on attempt to assign vectors with values out of range
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index bb352e429..23994181c 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -606,10 +606,10 @@ int ObjectRef::l_set_bone_position(lua_State *L) bone = lua_tostring(L, 2); v3f position = v3f(0, 0, 0); if (!lua_isnil(L, 3)) - position = read_v3f(L, 3); + position = check_v3f(L, 3); v3f rotation = v3f(0, 0, 0); if (!lua_isnil(L, 4)) - rotation = read_v3f(L, 4); + rotation = check_v3f(L, 4); co->setBonePosition(bone, position, rotation); return 0; } |