(svn r11025) -Fix: safeguard StrEmpty from calls with NULL.
authorrubidium
Fri, 31 Aug 2007 20:50:18 +0000
changeset 7510 95e12eac1b6d
parent 7509 23372ed624e8
child 7511 3b5200bf7342
(svn r11025) -Fix: safeguard StrEmpty from calls with NULL.
src/string.h
--- a/src/string.h	Fri Aug 31 20:03:50 2007 +0000
+++ b/src/string.h	Fri Aug 31 20:50:18 2007 +0000
@@ -49,7 +49,7 @@
 void strtolower(char *str);
 
 
-static inline bool StrEmpty(const char *s) { return s[0] == '\0'; }
+static inline bool StrEmpty(const char *s) { return s == NULL || s[0] == '\0'; }
 
 
 /** Get the length of a string, within a limited buffer */