From 2ac24735e867847842f541466b690b8b0252dd90 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 31 Aug 2007 20:50:18 +0000 Subject: (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 98fe7db40..b3beacb23 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 */ -- cgit v1.2.3-70-g09d2