mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
don't send a 0 length buffer.
1999-10-28 Jonathan Blandford <jrb@redhat.com> * src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): don't send a 0 length buffer.
This commit is contained in:
parent
9a1c50c961
commit
7e96137070
@ -292,7 +292,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, guchar *buf, size_t count)
|
||||
* to send the rest of the buffer.
|
||||
*/
|
||||
|
||||
if (retval && (priv->buf_offset + count) >= 128) {
|
||||
if (retval && (priv->buf_offset + count) > 128) {
|
||||
retval = (* priv->image_module->load_increment) (
|
||||
priv->context,
|
||||
buf,
|
||||
|
@ -216,7 +216,7 @@ myInputFunc (GifFileType *type, GifByteType *byte, int length)
|
||||
{
|
||||
GifData *context;
|
||||
|
||||
context = (GifData *) type->UserData;
|
||||
context = (GifData *) (type->UserData);
|
||||
g_print ("in myInputFunc\nSize requested is %d\n", length);
|
||||
|
||||
if (length > context->size - context->ptr) {
|
||||
|
@ -168,9 +168,9 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkDrawable *drawable,
|
||||
/* Sigh, GdkRGB does not have gdk_draw_rgb_32_image_dithalign(), so we
|
||||
* have to pack the buffer first.
|
||||
*/
|
||||
if (apb->has_alpha)
|
||||
buf = remove_alpha (apb, src_x, src_y, width, height, &rowstride);
|
||||
else {
|
||||
if (apb->has_alpha) {
|
||||
// buf = remove_alpha (apb, src_x, src_y, width, height, &rowstride);
|
||||
} else {
|
||||
buf = apb->pixels + src_y * apb->rowstride + src_x * 3;
|
||||
rowstride = apb->rowstride;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, guchar *buf, size_t count)
|
||||
* to send the rest of the buffer.
|
||||
*/
|
||||
|
||||
if (retval && (priv->buf_offset + count) >= 128) {
|
||||
if (retval && (priv->buf_offset + count) > 128) {
|
||||
retval = (* priv->image_module->load_increment) (
|
||||
priv->context,
|
||||
buf,
|
||||
|
Loading…
Reference in New Issue
Block a user