changeset 497:1da75c7d37a3 trunk

[svn] - decrement handle->rd_abs when we do an ungetc.
author nenolod
date Sun, 21 Jan 2007 19:55:50 -0800
parents f7b1b132e6ec
children 6779a84fbf10
files ChangeLog src/curl/curl.c
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jan 21 19:48:38 2007 -0800
+++ b/ChangeLog	Sun Jan 21 19:55:50 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-22 03:48:38 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1078]
+  - enforce UINT in charstack
+  
+  trunk/src/curl/curl.c |    8 ++------
+  1 file changed, 2 insertions(+), 6 deletions(-)
+
+
 2007-01-22 03:46:43 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1076]
   - fix getc emulation
--- a/src/curl/curl.c	Sun Jan 21 19:48:38 2007 -0800
+++ b/src/curl/curl.c	Sun Jan 21 19:55:50 2007 -0800
@@ -622,7 +622,10 @@
   handle->charstack = g_slist_prepend(handle->charstack, GUINT_TO_POINTER(c));
 
   if (handle->charstack != NULL)
+  {
+    handle->rd_abs--;
     return c;
+  }
 
   /* only reached if there is an error... */
   return EOF;
@@ -718,7 +721,7 @@
 curl_vfs_feof_impl(VFSFile * file)
 {
   CurlHandle *handle = file->handle;
-  return handle->rd_abs == handle->length;
+  return (handle->rd_abs == handle->length);
 }
 
 gint