summaryrefslogtreecommitdiff
path: root/xlib.c
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2015-08-24 21:45:08 -0500
committerBobby Bingham <koorogi@koorogi.info>2015-08-29 13:05:50 -0500
commit03af1408410e3e1ab0952e1fab6d7acf94b014ef (patch)
tree466b9b3c84587aaaafaf873280db147878dcd59e /xlib.c
parent87b3c456c7cc68719dcc33045a6f6866630f692f (diff)
use xor instead of incrementing blink
Because blink is a signed integer, an eventual overflow would result in undefined behavior.
Diffstat (limited to 'xlib.c')
-rw-r--r--xlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlib.c b/xlib.c
index d5c078c..a94e8f8 100644
--- a/xlib.c
+++ b/xlib.c
@@ -405,7 +405,7 @@ void uudisp_refresh(struct uudisp *d, struct uuterm *t)
int x1, x2, idx, y;
/* Clean up cursor first.. */
- if (p->curs_on && (!(d->blink&1) || t->x != p->curs_x || t->y != p->curs_y)) {
+ if (p->curs_on && (!d->blink || t->x != p->curs_x || t->y != p->curs_y)) {
idx = t->rows[p->curs_y]->idx;
if ((unsigned)p->slices_y[idx] < d->h)
blit_slice(d, idx, p->curs_x, p->curs_x);