summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-31 20:50:18 +0000
committerrubidium <rubidium@openttd.org>2007-08-31 20:50:18 +0000
commitc720d9d83aab9bc5a640b9a12b63104512120374 (patch)
treead14808af34b9e2738ab5e51d9da4024165ecbfe
parent8c85125fd9c06d1470f02e807bf359329338f97b (diff)
downloadopenttd-c720d9d83aab9bc5a640b9a12b63104512120374.tar.xz
(svn r11025) -Fix: safeguard StrEmpty from calls with NULL.
-rw-r--r--src/string.h2
1 files changed, 1 insertions, 1 deletions
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 */