Browse Source

no \0 restrict on string (close #1581)

Nicolas Cannasse 12 years ago
parent
commit
b9498e19b7
1 changed files with 1 additions and 3 deletions
  1. 1 3
      genjs.ml

+ 1 - 3
genjs.ml

@@ -340,9 +340,7 @@ let is_dynamic_iterator ctx e =
 let gen_constant ctx p = function
 	| TInt i -> print ctx "%ld" i
 	| TFloat s -> spr ctx s
-	| TString s ->
-		if String.contains s '\000' then error "A String cannot contain \\0 characters" p;
-		print ctx "\"%s\"" (Ast.s_escape s)
+	| TString s -> print ctx "\"%s\"" (Ast.s_escape s)
 	| TBool b -> spr ctx (if b then "true" else "false")
 	| TNull -> spr ctx "null"
 	| TThis -> spr ctx (this ctx)