summaryrefslogtreecommitdiffstats
path: root/src/register.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/register.c')
-rw-r--r--src/register.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/register.c b/src/register.c
index 89d4232c81..79e6021306 100644
--- a/src/register.c
+++ b/src/register.c
@@ -2399,8 +2399,8 @@ ex_display(exarg_T *eap)
msg_puts_attr("^J", attr);
n -= 2;
}
- for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0;
- ++p)
+ for (p = yb->y_array[j];
+ *p != NUL && (n -= ptr2cells(p)) >= 0; ++p)
{
clen = (*mb_ptr2len)(p);
msg_outtrans_len(p, clen);