소스 검색

[macro] set eof to false upon file seek

Simon Krajewski 10 년 전
부모
커밋
51369ce37b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      interp.ml

+ 2 - 1
interp.ml

@@ -1471,7 +1471,8 @@ let std_lib =
 		);
 		"file_seek", Fun3 (fun f pos mode ->
 			match f, pos, mode with
-			| VAbstract (AFRead (f,_)), VInt pos, VInt mode ->
+			| VAbstract (AFRead (f,r)), VInt pos, VInt mode ->
+				r := false;
 				seek_in f (match mode with 0 -> pos | 1 -> pos_in f + pos | 2 -> in_channel_length f + pos | _ -> error());
 				VNull;
 			| VAbstract (AFWrite f), VInt pos, VInt mode ->