X-Git-Url: http://plrg.eecs.uci.edu/git/?p=IRC.git;a=blobdiff_plain;f=Robust%2Fsrc%2FRuntime%2Ffile.c;h=0eb7d901d1628489da087b24d6147c72aca19916;hp=c8997a10601eff191ac8571c45fde704a8ad2b3b;hb=be34eec682d9c5a81206b8172032b3154ad57210;hpb=e497b0d05da3e13b5365cc477a6b7d792208b7f7 diff --git a/Robust/src/Runtime/file.c b/Robust/src/Runtime/file.c index c8997a10..0eb7d901 100644 --- a/Robust/src/Runtime/file.c +++ b/Robust/src/Runtime/file.c @@ -153,6 +153,7 @@ int CALL11(___FileInputStream______nativeAvailable____I, int fd, int fd) { int avail; int cur=lseek(fd, 0, SEEK_CUR); int fsize = lseek(fd, 0, SEEK_END); + lseek(fd,cur,SEEK_SET); // seek back to the current position avail=fsize-cur; return avail; #endif