summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWouter Coekaerts <coekie@irssi.org>2005-09-10 13:19:20 +0000
committercoekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564>2005-09-10 13:19:20 +0000
commitd5c5883867ea22623c19402cd00f2e60f3ed08cc (patch)
tree56ce320acc95fa67f95c3f5518f15f929d02348b /src
parentf55a35185af503e58b8e78abf0eef4034f7a30b3 (diff)
downloadirssi-d5c5883867ea22623c19402cd00f2e60f3ed08cc.zip
fix completion for /format (Bug 143)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3991 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/themes.c13
1 files 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;