diff src/gio/gio.c @ 3087:f333e6df5fa9

ungetc(): trash the stack of ungetc()'d chars if a seek is made
author William Pitcock <nenolod@atheme.org>
date Wed, 29 Apr 2009 21:12:44 -0500
parents e02b6092f70e
children 2bd8895c9fe0
line wrap: on
line diff
--- a/src/gio/gio.c	Wed Apr 29 21:02:33 2009 -0500
+++ b/src/gio/gio.c	Wed Apr 29 21:12:44 2009 -0500
@@ -203,6 +203,12 @@
     if (!g_seekable_can_seek(handle->seekable))
         return -1;
 
+    if (handle->stream_stack != NULL)
+    {
+        g_slist_free(handle->stream_stack);
+        handle->stream_stack = NULL;
+    }
+
     switch (whence)
     {
     case SEEK_CUR: