From 6eb6e75fff91f86d0e59d337f12ec93fcf9dc46e Mon Sep 17 00:00:00 2001 From: Foghrye4 Date: Sun, 23 Oct 2016 20:45:25 +0300 Subject: Adding LuaError on attempt to assign vectors with values out of range --- src/script/lua_api/l_object.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/lua_api') 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; } -- cgit v1.2.3