p will always be true, check for p[0] instead. [CID-144]

This commit is contained in:
Love Hornquist Astrand
2009-07-30 10:24:47 +02:00
parent 5373d3a869
commit 6312b8eb30

View File

@@ -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)