From c7500bb28e1cc7ea1c62b58c20248a8f852cc8e7 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 12 Jul 2015 19:31:37 -0500 Subject: [PATCH] Don't segfault in FS_CreatePath when there are no path seperators --- code/qcommon/files.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/qcommon/files.c b/code/qcommon/files.c index eb51faa9..376eaad9 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -533,7 +533,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) {