about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-08-08 16:13:51 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-08-08 16:13:51 +0200
commit20dae518c4abaac33226b5e8ae85d0de1a1b226e (patch)
treed462944216b508d7be7c77a88439a9fffeab7fa4
parent22e406514c70f881f132d0cc9bd04a4dbade3188 (diff)
downloadmblaze-20dae518c4abaac33226b5e8ae85d0de1a1b226e.tar.gz
mblaze-20dae518c4abaac33226b5e8ae85d0de1a1b226e.tar.xz
mblaze-20dae518c4abaac33226b5e8ae85d0de1a1b226e.zip
mscan: oneline: fix flag fiddling
-rw-r--r--mscan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mscan.c b/mscan.c
index c7c8a43..914f219 100644
--- a/mscan.c
+++ b/mscan.c
@@ -252,8 +252,10 @@ oneline(char *file)
 	}
 	
 	struct message *msg = blaze822(file);
-	char *flags = msg ? strstr(file, ":2,") : "";
-	if (*flags)
+	char *flags = msg ? strstr(file, ":2,") : 0;
+	if (!flags)
+		flags = "";
+	else
 		flags += 3;
 
 	int wleft = cols;