From fafa622a5bdf71adfbb4334541c3b65f29c89ca9 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 12 Jan 2020 15:05:40 -0500 Subject: all: fix or silence various gcc warnings As usual, gcc finds some real problems but also reports a ton of noise. Fix the problems and quiet the noise. --- src/cmd/draw/tweak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/draw') diff --git a/src/cmd/draw/tweak.c b/src/cmd/draw/tweak.c index 0a71e2dd..29e2b3d7 100644 --- a/src/cmd/draw/tweak.c +++ b/src/cmd/draw/tweak.c @@ -1142,7 +1142,7 @@ textedit(Thing *t, char *tag) fc = f->info; for(i=0; i<=w && i<=f->n; i++) nfc[i] = fc[i]; - if(w+1 < i) + if(i < w+1) memset(nfc+i, 0, ((w+1)-i)*sizeof(Fontchar)); x = fc[f->n].x; for(; i<=w; i++) -- cgit v1.2.3