summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-02-04 23:51:24 -0500
committerJune McEnroe <june@causal.agency>2018-02-04 23:51:24 -0500
commit536e53067a65723eae1c31861bde6559efc4f189 (patch)
tree4ac2764cfa33cf6a1b1a2583d5da01a95e1c48fd
parentReuse CGColorSpace and CGDataProvider in gfcocoa (diff)
downloadsrc-536e53067a65723eae1c31861bde6559efc4f189.tar.gz
src-536e53067a65723eae1c31861bde6559efc4f189.zip
Fix gfxx draw stop condition
Would not draw the last partially visible column when mirrored.
Diffstat (limited to '')
-rw-r--r--bin/gfxx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/gfxx.c b/bin/gfxx.c
index 0e1325b3..840c0e9b 100644
--- a/bin/gfxx.c
+++ b/bin/gfxx.c
@@ -152,7 +152,6 @@ static bool next(struct Pos *pos) {
             pos->left += width;
             pos->x = pos->left + width;
             pos->y = 0;
-            if (pos->x > pos->xres) return false;
         }
         pos->x--;
     } else {
@@ -165,10 +164,9 @@ static bool next(struct Pos *pos) {
             pos->left += width;
             pos->x = pos->left;
             pos->y = 0;
-            if (pos->x > pos->xres) return false;
         }
     }
-    return true;
+    return (pos->left < pos->xres);
 }
 
 static void put(const struct Pos *pos, uint32_t p) {