changeset 2429:ca5b5523cc2d trunk

[svn] - fix an offset error in the vfs_buffered_file wraparound implementation sections
author nenolod
date Sat, 27 Jan 2007 11:28:14 -0800
parents e832d4981008
children 4e2fc64d95ef
files ChangeLog src/audacious/vfs_buffered_file.c
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 27 08:22:15 2007 -0800
+++ b/ChangeLog	Sat Jan 27 11:28:14 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-27 16:22:15 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [3866]
+  - make sure tooltip_file != NULL otherwise filepopup may crash in strcmp().
+  
+  trunk/src/audacious/ui_fileinfopopup.c |    4 ++--
+  1 file changed, 2 insertions(+), 2 deletions(-)
+
+
 2007-01-27 15:34:13 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [3864]
   - revise logic of r3808 so that cdaudio works again.
--- a/src/audacious/vfs_buffered_file.c	Sat Jan 27 08:22:15 2007 -0800
+++ b/src/audacious/vfs_buffered_file.c	Sat Jan 27 11:28:14 2007 -0800
@@ -60,7 +60,10 @@
      */
     if ((vfs_ftell(handle->buffer)) + (size * nmemb) > 
 	((VFSBuffer *) handle->buffer->handle)->size)
+    {
+        vfs_fseek(handle->fd, vfs_ftell(handle->buffer), SEEK_SET);
         handle->which = TRUE;
+    }
 
     return vfs_fread(i_ptr, size, nmemb, handle->which == TRUE ? handle->fd : handle->buffer);
 }
@@ -86,7 +89,10 @@
      */
     if ((vfs_ftell(handle->buffer)) + 1 >
 	((VFSBuffer *) handle->buffer->handle)->size)
+    {
+        vfs_fseek(handle->fd, vfs_ftell(handle->buffer), SEEK_SET);
         handle->which = TRUE;
+    }
 
     return vfs_getc(handle->which == TRUE ? handle->fd : handle->buffer);
 }