diff options
author | Elliot Lee <sopwith@src.gnome.org> | 2000-08-01 00:33:49 +0000 |
---|---|---|
committer | Elliot Lee <sopwith@src.gnome.org> | 2000-08-01 00:33:49 +0000 |
commit | 4d721750872187fdba7bc580d2974cd2436ca742 (patch) | |
tree | 10cb3ed78802a19e2f19267540ede1e0b427b1ce /gdk-pixbuf/io-wbmp.c | |
parent | 75225b9f21a196be8cf593ed2266a8d376426d9c (diff) | |
download | gtk+-4d721750872187fdba7bc580d2974cd2436ca742.tar.gz |
Some bug fixes - now tested to work.
* io-wbmp.c: Some bug fixes - now tested to work.
Diffstat (limited to 'gdk-pixbuf/io-wbmp.c')
-rw-r--r-- | gdk-pixbuf/io-wbmp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdk-pixbuf/io-wbmp.c b/gdk-pixbuf/io-wbmp.c index 76cb8e65e0..d49658930b 100644 --- a/gdk-pixbuf/io-wbmp.c +++ b/gdk-pixbuf/io-wbmp.c @@ -199,7 +199,7 @@ get_mbi(struct wbmp_progressive_state *context, guchar **buf, guint *buf_size, i } while(n < sizeof(intbuf) && (intbuf[n-1] & 0x80)); out: - if(!rv || !(intbuf[n-1] & 0x80)) + if(!rv || (intbuf[n-1] & 0x80)) { rv = save_rest(context, intbuf, n); @@ -263,6 +263,8 @@ gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data, guchar * buf, { context->need_height = FALSE; context->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, context->width, context->height); + g_assert(context->pixbuf); + if(context->prepared_func) context->prepared_func(context->pixbuf, context->user_data); } @@ -283,7 +285,7 @@ gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data, guchar * buf, goto out; ptr = context->pixbuf->pixels + context->pixbuf->rowstride * context->cury + context->curx * 3; - for(xoff = 0; xoff < 8; xoff++, ptr += 3) + for(xoff = 7; xoff >= 0; xoff--, ptr += 3) { guchar pixval; |