summary refs log tree commit diff
path: root/bin/gfxx.c
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2018-02-04 23:51:24 -0500
committerJune McEnroe <programble@gmail.com>2018-02-04 23:51:24 -0500
commit9acb950c0a5e7a8ab4b33a6f0507f791c0067eba (patch)
tree978932bd1c069a896545832b884ea25c9c5c8244 /bin/gfxx.c
parentReuse CGColorSpace and CGDataProvider in gfcocoa (diff)
downloadsrc-9acb950c0a5e7a8ab4b33a6f0507f791c0067eba.tar.gz
src-9acb950c0a5e7a8ab4b33a6f0507f791c0067eba.zip
Fix gfxx draw stop condition
Would not draw the last partially visible column when mirrored.
Diffstat (limited to 'bin/gfxx.c')
-rw-r--r--bin/gfxx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/gfxx.c b/bin/gfxx.c
index 1477a8c7..2b19c4ef 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) {