we're grownups now. don't care about stupid OS'es that don't know what an
[apps/madmutt.git] / lib / str.c
index 26df4b2..451b898 100644 (file)
--- a/lib/str.c
+++ b/lib/str.c
@@ -21,7 +21,7 @@ char *str_dup (const char *s)
   char *p;
   size_t l;
 
-  if (!s) return 0;
+  if (!s || !*s) return NULL;
   l = str_len (s) + 1;
   p = (char *) mem_malloc (l);
   memcpy (p, s, l);