diff options
-rw-r--r-- | dive.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -32,7 +32,7 @@ static inline int same_string(const char *a, const char *b) static inline char *copy_string(const char *s) { - return s ? strdup(s) : NULL; + return (s && *s) ? strdup(s) : NULL; } #include <libxml/tree.h> |