Browse Source

fixed error with too long hexadecimal integers

Nicolas Cannasse 16 years ago
parent
commit
dcdbea0d3b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      typeload.ml

+ 1 - 0
typeload.ml

@@ -24,6 +24,7 @@ open Typecore
 let type_constant ctx c p =
 	match c with
 	| Int s ->
+		if String.length s > 10 && String.sub s 0 2 = "0x" then error "Invalid hexadecimal integer" p;
 		(try
 			mk (TConst (TInt (Int32.of_string s))) ctx.api.tint p
 		with