Skip to content

Commit 1a88c4b

Browse files
committed
Getv3intfield: Fix logic of return bool
1 parent cbb9301 commit 1a88c4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/script/common/c_converter.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ bool getv3intfield(lua_State *L, int index,
6666
lua_getfield(L, index, fieldname);
6767
bool got = false;
6868
if (lua_istable(L, -1)) {
69-
got = getintfield(L, index, "x", result.X) ||
70-
getintfield(L, index, "y", result.Y) ||
71-
getintfield(L, index, "z", result.Z);
69+
got |= getintfield(L, -1, "x", result.X);
70+
got |= getintfield(L, -1, "y", result.Y);
71+
got |= getintfield(L, -1, "z", result.Z);
7272
}
7373
lua_pop(L, 1);
7474
return got;

0 commit comments

Comments
 (0)