Upgrade Lua to 5.4.3 (#217)

Based on https://github.com/lua/lua/releases/tag/v5.4.3 (commit eadd8c7).
This commit is contained in:
Paul Kulchenko 2021-07-28 09:26:35 -07:00 committed by GitHub
parent 3ac6576fe5
commit a73e808b25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 464 additions and 264 deletions

View file

@ -1293,7 +1293,8 @@ static int validop (int op, TValue *v1, TValue *v2) {
case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR:
case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: { /* conversion errors */
lua_Integer i;
return (tointegerns(v1, &i) && tointegerns(v2, &i));
return (luaV_tointegerns(v1, &i, LUA_FLOORN2I) &&
luaV_tointegerns(v2, &i, LUA_FLOORN2I));
}
case LUA_OPDIV: case LUA_OPIDIV: case LUA_OPMOD: /* division by 0 */
return (nvalue(v2) != 0);