win32: make sure bytes_read/written is set to 0 on error

Desktop / GNOME / GLib - Ignacio Casal Quinteiro [gnome.org] - 23 October 2015 03:34 UTC

If we fail to PeekMessage or PostMessage we should make sure that the output parameter bytes_read/written is set 0 instead of being left uninitialized. This fixes an assertion in the io channel call where the following invariant is checked: (status == G_IO_STATUS_NORMAL) || (read_size == 0)

50d704a win32: make sure bytes_read/written is set to 0 on error
glib/giowin32.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Upstream: git.gnome.org


  • Share