Browse Source

open files in binary for accurate position in --display

Nicolas Cannasse 18 years ago
parent
commit
fe000b5d48
1 changed files with 1 additions and 1 deletions
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -2608,7 +2608,7 @@ let load ctx m p =
 					String.concat "/" (x :: l) ^ "/" ^ name
 			) ^ ".hx" in
 			let file = (try Plugin.find_file file with Not_found -> raise (Error (Module_not_found m,p))) in
-			let ch = (try open_in file with _ -> error ("Could not open " ^ file) p) in
+			let ch = (try open_in_bin file with _ -> error ("Could not open " ^ file) p) in
 			let pack , decls = (try Parser.parse (Lexing.from_channel ch) file with e -> close_in ch; raise e) in
 			let pack , decls = (match pack , fst m with "flash" :: l , "flash9" :: l2 when l = l2 && Plugin.defined "flash9doc" -> fst m, List.map f9decl decls | _ -> pack , decls) in
 			close_in ch;