From 03af1408410e3e1ab0952e1fab6d7acf94b014ef Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Mon, 24 Aug 2015 21:45:08 -0500 Subject: use xor instead of incrementing blink Because blink is a signed integer, an eventual overflow would result in undefined behavior. --- xlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlib.c') 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); -- cgit v1.2.3