summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-17 12:06:47 +0000
committerrubidium <rubidium@openttd.org>2007-05-17 12:06:47 +0000
commitaea6ef94bc29b67c773eb9499fc1a37a75792298 (patch)
tree84815f2e0d08dbbe02bda5efc938c10597b06998
parent042bcc03252514747675b0170bd86eac64e96067 (diff)
downloadopenttd-aea6ef94bc29b67c773eb9499fc1a37a75792298.tar.xz
(svn r9861) -Fix: null pointer derefence under MorphOS and AmigaOS.
-rw-r--r--src/unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unix.cpp b/src/unix.cpp
index 72ac0db12..43429778d 100644
--- a/src/unix.cpp
+++ b/src/unix.cpp
@@ -53,7 +53,7 @@ bool FiosIsRoot(const char *path)
#else
/* On MorphOS or AmigaOS paths look like: "Volume:directory/subdirectory" */
const char *s = strchr(path, ':');
- return s[1] == '\0';
+ return s != NULL && s[1] == '\0';
#endif
}