# HG changeset patch # User William Pitcock # Date 1241057564 18000 # Node ID f333e6df5fa985af2846bb0ab1a0a5fd14ae3e87 # Parent 1090853873d25fec948a7b45a523a5c7dbb0a93e ungetc(): trash the stack of ungetc()'d chars if a seek is made diff -r 1090853873d2 -r f333e6df5fa9 src/gio/gio.c --- 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: