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 | 2ac24735e867847842f541466b690b8b0252dd90 (patch) | |
tree | ad14808af34b9e2738ab5e51d9da4024165ecbfe | |
parent | 5243d98761e20e51eb48279a226a21a86c5bb59e (diff) | |
download | openttd-2ac24735e867847842f541466b690b8b0252dd90.tar.xz |
(svn r11025) -Fix: safeguard StrEmpty from calls with NULL.
-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 */ |