summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/message.c b/src/message.c
index 9c57491635..609922a2f2 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1842,7 +1842,7 @@ msg_puts_display(str, maxlen, attr, recurse)
int wrap;
did_wait_return = FALSE;
- while (*s != NUL && (maxlen < 0 || (int)(s - str) < maxlen))
+ while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL)
{
/*
* We are at the end of the screen line when: