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:
Jonathan Blandford 1999-10-28 19:30:11 +00:00 committed by Jonathan Blandford
parent 9a1c50c961
commit 7e96137070
4 changed files with 6 additions and 6 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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;
}

View File

@ -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,