Commit 7e961370 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford
Browse files

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.
parent 9a1c50c9
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment