# HG changeset patch # User jbe # Date 1571509408 -7200 # Node ID d5bad374641e5f666bf0244ae050fe0f524de13b # Parent 80c16991a77067aea32e8c3f9054f534e231b841 Fixed wrong use of logical-or operator introduced in previous commits diff -r 80c16991a770 -r d5bad374641e libraries/mondelefant/mondelefant_native.c --- a/libraries/mondelefant/mondelefant_native.c Sat Oct 19 20:09:41 2019 +0200 +++ b/libraries/mondelefant/mondelefant_native.c Sat Oct 19 20:23:28 2019 +0200 @@ -1783,7 +1783,7 @@ if (!lua_isnil(L, 6)) { // special handling of 1:1 references (primary side): lua_getfield(L, 6, "mode"); // 7 - if (!strcmp(lua_tostring(L, 7) || "", "11")) { + if (lua_isstring(L, 7) && !strcmp(lua_tostring(L, 7), "11")) { lua_getfield(L, 6, "primary"); // 8 if (lua_toboolean(L, 8)) { if (!lua_isnil(L, 3)) { @@ -1806,7 +1806,7 @@ lua_settop(L, 6); // special handling of 1:1 references (secondary side): lua_getfield(L, 6, "mode"); // 7 - if (!strcmp(lua_tostring(L, 7) || "", "11")) { + if (lua_isstring(L, 7) && !strcmp(lua_tostring(L, 7), "11")) { lua_settop(L, 6); if (!lua_isnil(L, 3)) { // store object in other _ref table (use false for nil): // TODO: use special object instead of false