forked from pool/lua54
Matej Cepl
ce441f7720
- this is a bug-fix release. - Lua 5.4.5 also contains several internal improvements and includes a revised reference manual - Remove upstreamed patches: - luabugs1.patch - luabugs10.patch - luabugs11.patch - luabugs2.patch - luabugs6.patch - luabugs7.patch - luabugs8.patch - luabugs9.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua54?expand=0&rev=72
21 lines
693 B
Diff
21 lines
693 B
Diff
From c764ca71a639f5585b5f466bea25dc42b855a4b0 Mon Sep 17 00:00:00 2001
|
|
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
|
|
Date: Mon, 25 Apr 2022 14:42:51 -0300
|
|
Subject: [PATCH] Bug: Wrong code generation in bitwise operations
|
|
|
|
---
|
|
src/lcode.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/src/lcode.c
|
|
+++ b/src/lcode.c
|
|
@@ -1531,7 +1531,7 @@ static void codecommutative (FuncState *
|
|
static void codebitwise (FuncState *fs, BinOpr opr,
|
|
expdesc *e1, expdesc *e2, int line) {
|
|
int flip = 0;
|
|
- if (e1->k == VKINT) {
|
|
+ if (e1->k == VKINT && luaK_exp2K(fs, e1)) {
|
|
swapexps(e1, e2); /* 'e2' will be the constant operand */
|
|
flip = 1;
|
|
}
|