# HG changeset patch # User rubidium # Date 1188593418 0 # Node ID 95e12eac1b6d8481d9a3cf006968d5ad0d87cc35 # Parent 23372ed624e8e692b3ae9298e8cdc5120208a859 (svn r11025) -Fix: safeguard StrEmpty from calls with NULL. diff -r 23372ed624e8 -r 95e12eac1b6d 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 */