Sfoglia il codice sorgente

minor swf format fixes

Nicolas Cannasse 17 anni fa
parent
commit
27b5ab2718
2 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 4 1
      genas3.ml
  2. 1 1
      genswf9.ml

+ 4 - 1
genas3.ml

@@ -1091,7 +1091,10 @@ let gen_method ctx ch name mt =
 	let params = List.map (fun a ->
 		let name = (match m.mt3_pnames with
 			| None -> "p" ^ string_of_int !p
-			| Some l -> ident ctx (List.nth l (!p))
+			| Some l ->
+				match List.nth l !p with
+				| None -> "p" ^ string_of_int !p
+				| Some i -> ident ctx i
 		) in
 		let opt_val = (match m.mt3_dparams with
 			| None -> None

+ 1 - 1
genswf9.ml

@@ -326,7 +326,7 @@ let define_local ctx ?(init=false) name t el =
 			LScope pos
 		end else
 			let r = alloc_reg ctx (classify ctx t) in
-			if ctx.debug then write ctx (HDebugReg (name, r.rid-1, ctx.last_line));
+			if ctx.debug then write ctx (HDebugReg (name, r.rid, ctx.last_line));
 			r.rinit <- init;
 			LReg r
 	) in