Nicolas Cannasse 19 years ago
parent
commit
5dacbabe86
1 changed files with 1 additions and 0 deletions
  1. 1 0
      genswf8.ml

+ 1 - 0
genswf8.ml

@@ -1435,6 +1435,7 @@ let generate file ver header infile types hres =
 	let idents = ctx.idents in
 	let idents = Hashtbl.fold (fun ident pos acc -> (ident,pos) :: acc) idents [] in
 	let idents = List.sort (fun (_,p1) (_,p2) -> compare p1 p2) idents in
+	if List.length idents >= 1 lsl 16 then failwith "The SWF can't handle more than a number 64K of identifers and literal strings. Try reducing this number by using external data files loaded at runtime";
 	DynArray.set ctx.opcodes 0 (AStringPool (List.map (fun (id,_) -> to_utf8 id) idents));
 	let tag ?(ext=false) d = {
 		tid = 0;