[prev in list] [next in list] [prev in thread] [next in thread] 

List:       elinks-cvs
Subject:    [ELinks] elinks - jonas: draw_doc(): Insert sanity check. Bail out...
From:       cvs () pasky ! ji ! cz
Date:       2003-07-31 14:15:51
Message-ID: 20030731141551.5783.qmail () machine ! sinus ! cz
[Download RAW message or body]

This is an automated notification of a change to the ELinks CVS tree.

Author: jonas
Module: elinks
   Tag: <TRUNK>
  Date: Thu Jul 31 14:15:51 2003 GMT

---- Log message:

draw_doc(): Insert sanity check. Bail out if width or height of the view is < 2. I \
don't know why but Zas spotted this. ;)



---- Files affected:

elinks/src/viewer/text:
   view.c (1.175 -> 1.176) 
    http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/viewer/text/view.c.diff?r1=1.175&r2=1.176&f=u



---- Diffs:

Index: elinks/src/viewer/text/view.c
diff -u elinks/src/viewer/text/view.c:1.175 elinks/src/viewer/text/view.c:1.176
--- elinks/src/viewer/text/view.c:1.175	Thu Jul 31 02:33:30 2003
+++ elinks/src/viewer/text/view.c	Thu Jul 31 16:15:45 2003
@@ -270,6 +270,10 @@
 	xw = scr->xw;
 	yw = scr->yw;
 
+	/* The code in this function assumes that both width and height are
+	 * bigger than 1 so we have to bail out here. */
+	if (xw < 2 || yw < 2) return;
+
 	if (active) {
 		set_cursor(t, xp + xw - 1, yp + yw - 1, 0);
 		set_window_ptr(get_current_tab(t), xp, yp);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic