mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
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:
parent
3ac6576fe5
commit
a73e808b25
41 changed files with 464 additions and 264 deletions
3
third_party/lua/lcode.c
vendored
3
third_party/lua/lcode.c
vendored
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue