From cd50d8d2e7d1085808b15e9e4be66a52289df013 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 12 Jul 2015 19:31:37 -0500 Subject: Don't segfault in FS_CreatePath when there are no path seperators --- src/qcommon/files.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qcommon/files.c b/src/qcommon/files.c index 576ad9d2..cedbeaf4 100644 --- a/src/qcommon/files.c +++ b/src/qcommon/files.c @@ -511,7 +511,9 @@ qboolean FS_CreatePath (char *OSPath) { // Skip creation of the root directory as it will always be there ofs = strchr( path, PATH_SEP ); - ofs++; + if ( ofs != NULL ) { + ofs++; + } for (; ofs != NULL && *ofs ; ofs++) { if (*ofs == PATH_SEP) { -- cgit