summaryrefslogtreecommitdiff
path: root/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'bugs')
-rw-r--r--bugs42
1 files changed, 42 insertions, 0 deletions
diff --git a/bugs b/bugs
index 27bf71d0..e9ea6b73 100644
--- a/bugs
+++ b/bugs
@@ -797,3 +797,45 @@ patch = [[
797 797
798} 798}
799 799
800
801
802-----------------------------------------------------------------
803-- Lua 5.1
804
805Bug{
806what = [[In 16-bit machines, expressions and/or with numeric constants as the
807right operand may result in weird values]],
808
809report = [[Andreas Stenius, 15/03/2006]],
810
811example = [[
812print(false or 0) -- on 16-bit machines
813]],
814
815patch = [[
816* lcode.c:
817@@ -731,17 +731,15 @@
818 case OPR_AND: {
819 lua_assert(e1->t == NO_JUMP); /* list must be closed */
820 luaK_dischargevars(fs, e2);
821- luaK_concat(fs, &e1->f, e2->f);
822- e1->k = e2->k; e1->u.s.info = e2->u.s.info;
823- e1->u.s.aux = e2->u.s.aux; e1->t = e2->t;
824+ luaK_concat(fs, &e2->f, e1->f);
825+ *e1 = *e2;
826 break;
827 }
828 case OPR_OR: {
829 lua_assert(e1->f == NO_JUMP); /* list must be closed */
830 luaK_dischargevars(fs, e2);
831- luaK_concat(fs, &e1->t, e2->t);
832- e1->k = e2->k; e1->u.s.info = e2->u.s.info;
833- e1->u.s.aux = e2->u.s.aux; e1->f = e2->f;
834+ luaK_concat(fs, &e2->t, e1->t);
835+ *e1 = *e2;
836 break;
837 }
838]],
839
840}
841