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. --- dblbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dblbuf.c') diff --git a/dblbuf.c b/dblbuf.c index f6cbd88..afa180c 100644 --- a/dblbuf.c +++ b/dblbuf.c @@ -176,7 +176,7 @@ void uudisp_refresh(struct uudisp *d, struct uuterm *t) blit_slice(d, idx, x1, x2); } - if (d->blink & 1) { + if (d->blink) { unsigned long rev = expand_color(d, 15); int idx = t->rows[t->y]->idx; b->slices[idx].colors[2*t->x] ^= rev; -- cgit v1.2.3