aboutsummaryrefslogtreecommitdiff
path: root/bugs
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-03-21 16:28:49 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-03-21 16:28:49 -0300
commit1ae0b6c0bf9c389bcf9bdf266591cb1e17e80a15 (patch)
tree2c9d090fe0c4c7e8e1486e43bc24fd6bddfc0ddb /bugs
parente1dda047b24600e67796279337db4be1d01cb673 (diff)
downloadlua-1ae0b6c0bf9c389bcf9bdf266591cb1e17e80a15.tar.gz
lua-1ae0b6c0bf9c389bcf9bdf266591cb1e17e80a15.tar.bz2
lua-1ae0b6c0bf9c389bcf9bdf266591cb1e17e80a15.zip
BUG: should copy the union, not (some of) its fields
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