Explorar el Código

[flash] fixed VerifyError from legacy alchemy swc (#10232)

* [flash] fixed VerifyError from legacy alchemy swc

* typo indent
R32 hace 3 años
padre
commit
3654da4028
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      libs/swflib/as3hlparse.ml

+ 2 - 1
libs/swflib/as3hlparse.ml

@@ -886,6 +886,7 @@ let flatten t =
 		Array.iter (browse_field ctx) s.hls_fields;
 		browse_method ctx s.hls_method;
 	) t;
+	let classes = List.sort (fun c1 c2 -> c1.hlc_index - c2.hlc_index) (List.rev !classes) in
 	let methods = List.sort (fun m1 m2 -> m1.hlmt_index - m2.hlmt_index) (List.rev !methods) in
 	(* done *)
 	let rec ctx = {
@@ -898,7 +899,7 @@ let flatten t =
 		fnames = new_lookup flatten_name;
 		fmetas = new_lookup flatten_meta;
 		fmethods = new_index_lookup methods flatten_method;
-		fclasses = new_index_lookup (List.rev !classes) flatten_class;
+		fclasses = new_index_lookup classes flatten_class;
 		fjumps = [];
 		ffunctions = [];
 	} in