summaryrefslogtreecommitdiffstats
path: root/package/lua/lua-bug3-boolean_expression.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-08-25 14:49:17 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2010-08-25 14:49:17 +0200
commita99b1bb24fa09ecbdcde0364514d3690caaadcc8 (patch)
tree7abf0c1fff6a0b871a2f5a12200d32a06c2c9d35 /package/lua/lua-bug3-boolean_expression.patch
parent2c31d745ac08e620d143cc266e2b7113754a8787 (diff)
parent311e0a6fc49a2135a3a5e1e63fe8b77c184cb8c9 (diff)
downloadbuildroot-novena-a99b1bb24fa09ecbdcde0364514d3690caaadcc8.tar.gz
buildroot-novena-a99b1bb24fa09ecbdcde0364514d3690caaadcc8.zip
Merge branch 'for-2010.08' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'package/lua/lua-bug3-boolean_expression.patch')
-rw-r--r--package/lua/lua-bug3-boolean_expression.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/lua/lua-bug3-boolean_expression.patch b/package/lua/lua-bug3-boolean_expression.patch
new file mode 100644
index 000000000..f04eb8507
--- /dev/null
+++ b/package/lua/lua-bug3-boolean_expression.patch
@@ -0,0 +1,48 @@
+--- lua-5.1.4.orig/src/lcode.c 2007/12/28 15:32:23 2.25.1.3
++++ lua-5.1.4/src/lcode.c 2009/06/15 14:07:34
+@@ -544,15 +544,18 @@
+ pc = NO_JUMP; /* always true; do nothing */
+ break;
+ }
+- case VFALSE: {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+ case VJMP: {
+ invertjump(fs, e);
+ pc = e->u.s.info;
+ break;
+ }
++ case VFALSE: {
++ if (!hasjumps(e)) {
++ pc = luaK_jump(fs); /* always jump */
++ break;
++ }
++ /* else go through */
++ }
+ default: {
+ pc = jumponcond(fs, e, 0);
+ break;
+@@ -572,14 +575,17 @@
+ pc = NO_JUMP; /* always false; do nothing */
+ break;
+ }
+- case VTRUE: {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+ case VJMP: {
+ pc = e->u.s.info;
+ break;
+ }
++ case VTRUE: {
++ if (!hasjumps(e)) {
++ pc = luaK_jump(fs); /* always jump */
++ break;
++ }
++ /* else go through */
++ }
+ default: {
+ pc = jumponcond(fs, e, 1);
+ break;
+