Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Getv3intfield: Fix logic of return bool
- Loading branch information
Showing
with
3 additions
and
3 deletions.
-
+3
−3
src/script/common/c_converter.h
|
@@ -66,9 +66,9 @@ bool getv3intfield(lua_State *L, int index, |
|
|
lua_getfield(L, index, fieldname); |
|
|
bool got = false; |
|
|
if (lua_istable(L, -1)) { |
|
|
got = getintfield(L, index, "x", result.X) || |
|
|
getintfield(L, index, "y", result.Y) || |
|
|
getintfield(L, index, "z", result.Z); |
|
|
got |= getintfield(L, -1, "x", result.X); |
|
|
got |= getintfield(L, -1, "y", result.Y); |
|
|
got |= getintfield(L, -1, "z", result.Z); |
|
|
} |
|
|
lua_pop(L, 1); |
|
|
return got; |
|
|