stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/video linedraw.c


From: Nehal Mistry
Subject: [Stratagus-CVS] stratagus/src/video linedraw.c
Date: Thu, 27 Nov 2003 05:33:52 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Nehal Mistry <address@hidden>   03/11/27 05:33:51

Modified files:
        src/video      : linedraw.c 

Log message:
        fix line clipping crashing

Patches:
Index: stratagus/src/video/linedraw.c
diff -u stratagus/src/video/linedraw.c:1.52 stratagus/src/video/linedraw.c:1.53
--- stratagus/src/video/linedraw.c:1.52 Thu Nov 27 02:03:10 2003
+++ stratagus/src/video/linedraw.c      Thu Nov 27 05:33:51 2003
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: linedraw.c,v 1.52 2003/11/27 07:03:10 nehalmistry Exp $
+//     $Id: linedraw.c,v 1.53 2003/11/27 10:33:51 nehalmistry Exp $
 
 //@{
 
@@ -669,19 +669,19 @@
     int h;
 
     // FIXME: messy
-    if (dx > sx && dy > sy) {
+    if (dx >= sx && dy >= sy) {
        w = dx - sx;
        h = dy - sy;
        CLIP_RECTANGLE(sx, sy, w, h);
        dx = sx + w;
        dy = sy + h;
-    } else if (dx > sx && dy < sy) {
+    } else if (dx >= sx && dy < sy) {
        w = dx - sx;
        h = sy - dy;
        CLIP_RECTANGLE(sx, dy, w, h);
        dx = sx + w;
        sy = dy + h;
-    } else if (dx < sx && dy > sy) {
+    } else if (dx < sx && dy >= sy) {
        w = sx - dx;
        h = dy - sy;
        CLIP_RECTANGLE(dx, sy, w, h);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]