From 6312b8eb30693d8d9c56be874a31631b7c0734d5 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Thu, 30 Jul 2009 10:24:47 +0200 Subject: [PATCH] p will always be true, check for p[0] instead. [CID-144] --- appl/xnlock/xnlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appl/xnlock/xnlock.c b/appl/xnlock/xnlock.c index d60f8fb77..4bc727f14 100644 --- a/appl/xnlock/xnlock.c +++ b/appl/xnlock/xnlock.c @@ -822,7 +822,7 @@ talk(int force_erase) } /* p2 now points to the first '\n' */ - for (height = 0; p; height++) { + for (height = 0; p[0]; height++) { int w; *p2 = 0; if ((w = XTextWidth(font, p, p2 - p)) > width)