small preview fix

David Mosberger-Tang (davidm@azstarnet.com)
Mon, 12 May 1997 07:58:30 -0700

Here is a tiny fix that avoids a potential segfault during the preview
(I'm surprised this bug hasn't shown its ugly head before).

--david

--- frontend/preview.c~ Sun May 4 18:13:47 1997
+++ frontend/preview.c Mon May 12 07:43:07 1997
@@ -233,7 +233,7 @@

/* don't draw last line unless it's complete: */
height = p->image_y;
- if (p->image_x == 0)
+ if (p->image_x == 0 && height < p->image_height)
++height;

/* for now, use simple nearest-neighbor interpolation: */

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com