]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Getv3intfield: Fix logic of return bool
authorparamat <paramat@users.noreply.github.com>
Sun, 4 Mar 2018 18:19:37 +0000 (18:19 +0000)
committerparamat <mat.gregory@virginmedia.com>
Fri, 9 Mar 2018 03:16:25 +0000 (03:16 +0000)
src/script/common/c_converter.h

index 67b23f131521b1b5bda566546d282560cc08a07d..04fdb353aabe12e601f4fbb44d8e303fe0546879 100644 (file)
@@ -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;