浏览代码

open files in binary for accurate position in --display

Nicolas Cannasse 18 年之前
父节点
当前提交
fe000b5d48
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      typer.ml

+ 1 - 1
typer.ml

@@ -2608,7 +2608,7 @@ let load ctx m p =
 					String.concat "/" (x :: l) ^ "/" ^ name
 					String.concat "/" (x :: l) ^ "/" ^ name
 			) ^ ".hx" in
 			) ^ ".hx" in
 			let file = (try Plugin.find_file file with Not_found -> raise (Error (Module_not_found m,p))) 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 = (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
 			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;
 			close_in ch;