diff options
author | rubidium <rubidium@openttd.org> | 2007-08-31 20:50:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-31 20:50:18 +0000 |
commit | c720d9d83aab9bc5a640b9a12b63104512120374 (patch) | |
tree | ad14808af34b9e2738ab5e51d9da4024165ecbfe /src | |
parent | 8c85125fd9c06d1470f02e807bf359329338f97b (diff) | |
download | openttd-c720d9d83aab9bc5a640b9a12b63104512120374.tar.xz |
(svn r11025) -Fix: safeguard StrEmpty from calls with NULL.
Diffstat (limited to 'src')
-rw-r--r-- | src/string.h | 2 |
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 */ |