Browse Source

fixed --i

Nicolas Cannasse 17 years ago
parent
commit
f8fa751027
2 changed files with 5 additions and 2 deletions
  1. 2 0
      doc/CHANGES.txt
  2. 3 2
      genswf9.ml

+ 2 - 0
doc/CHANGES.txt

@@ -2,6 +2,8 @@
 	some optimization and bugfix for as3 codegen
 	bugfix : allow bitmaps and fonts classes for F9 library
 	bugfix : neko.Web.setCookie
+	bugfix : as3 switches in -swf-lib, and enable to "repair" corrupted as3 bytecode
+	fixed --i return value in flash9
 
 2008-01-13: 1.17
 	fixed Int32.compare, added Int32.read and Int32.write

+ 3 - 2
genswf9.ml

@@ -1080,8 +1080,9 @@ and gen_unop ctx retval op flag e =
 		match acc with
 		| VReg r when r.rtype = KInt ->
 			if not r.rinit then r.rcond <- true;
-			if retval then getvar ctx (gen_access ctx e Read);
-			write ctx (if incr then HIncrIReg r.rid else HDecrIReg r.rid)
+			if retval && flag = Postfix then getvar ctx (gen_access ctx e Read);
+			write ctx (if incr then HIncrIReg r.rid else HDecrIReg r.rid);
+			if retval && flag = Prefix then getvar ctx (gen_access ctx e Read);
 		| _ ->
 		getvar ctx (gen_access ctx e Read);
 		match flag with