mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gio: Update GMemoryOutputStream length after truncate
For GMemoryOutputStream, update valid_len when truncating so that g_memory_output_stream_get_data_size () returns the correct result. https://bugzilla.gnome.org/show_bug.cgi?id=720080
This commit is contained in:
committed by
Matthias Clasen
parent
c34cc2348c
commit
3b9ad6e6ef
@@ -828,6 +828,8 @@ g_memory_output_stream_truncate (GSeekable *seekable,
|
||||
if (!array_resize (ostream, offset, FALSE, error))
|
||||
return FALSE;
|
||||
|
||||
ostream->priv->valid_len = offset;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user