From c720d9d83aab9bc5a640b9a12b63104512120374 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 31 Aug 2007 20:50:18 +0000 Subject: [PATCH] (svn r11025) -Fix: safeguard StrEmpty from calls with NULL. --- src/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string.h b/src/string.h index 98fe7db409..b3beacb237 100644 --- a/src/string.h +++ b/src/string.h @@ -49,7 +49,7 @@ enum CharSetFilter { 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 */