Browse Source

[macro] set eof to false upon file seek

Simon Krajewski 10 years ago
parent
commit
51369ce37b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      interp.ml

+ 2 - 1
interp.ml

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