From d5c5883867ea22623c19402cd00f2e60f3ed08cc Mon Sep 17 00:00:00 2001 From: Wouter Coekaerts Date: Sat, 10 Sep 2005 13:19:20 +0000 Subject: [PATCH] fix completion for /format (Bug 143) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3991 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/themes.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index 53d5e262..b4407bda 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -1249,12 +1249,13 @@ static void sig_complete_format(GList **list, WINDOW_REC *window, ptr = line; words = 0; - do { - ptr++; - - words++; - ptr = strchr(ptr, ' '); - } while (ptr != NULL); + if (*ptr != '\0') { + do { + ptr++; + words++; + ptr = strchr(ptr, ' '); + } while (ptr != NULL); + } if (words > 2) return;