فهرست منبع

fix for uninitialized integer registers

Nicolas Cannasse 18 سال پیش
والد
کامیت
21ba93f29b
2فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 1 0
      doc/CHANGES.txt
  2. 1 0
      genswf9.ml

+ 1 - 0
doc/CHANGES.txt

@@ -13,6 +13,7 @@
 	fixed Std.int with negative numbers
 	fixed some F9 issues with haXe-specific Array, Date and Math methods
 	used AS3 namespace for F9 Array and String instance methods
+	fixed F9 with uninitialized integer registers
 
 2007-07-25: 1.14
 	fixed no error when invalid "catch" expression

+ 1 - 0
genswf9.ml

@@ -1101,6 +1101,7 @@ and gen_unop ctx retval op flag e =
 		let acc = gen_access ctx e Write in (* for set *)
 		match acc with
 		| VReg r when not retval && r.rtype = KInt ->
+			if not r.rinit then r.rcond <- true;
 			write ctx (if incr then A3IncrIReg r.rid else A3DecrIReg r.rid)
 		| _ ->
 		getvar ctx (gen_access ctx e Read);