changeset 1999:0c45328c9f8b

fixed seek to EOF pos
author arpi
date Thu, 27 Sep 2001 20:36:53 +0000
parents d3378988a98e
children 5fd3f344fc89
files stream.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream.c	Thu Sep 27 20:36:19 2001 +0000
+++ b/stream.c	Thu Sep 27 20:36:53 2001 +0000
@@ -132,11 +132,13 @@
 }
 
   stream_fill_buffer(s);
-  if(pos>=0 && pos<s->buf_len){
+  if(pos>=0 && pos<=s->buf_len){
     s->buf_pos=pos; // byte position in sector
     return 1;
   }
   
+//  if(pos==s->buf_len) printf("XXX Seek to last byte of file -> EOF\n");
+  
 #ifdef _LARGEFILE_SOURCE
   mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
 #else