From a56b8363289c3c0078b0fdac7c92f6c2f0fa594c Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 4 Mar 2015 11:49:15 +0000 Subject: [PATCH] Fix underflow in various commands when using an empty file name. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12180 d7cf8633-e32d-0410-b094-e92efae38249 --- fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs.c b/fs.c index 67d13f93..817780f7 100644 --- a/fs.c +++ b/fs.c @@ -3350,7 +3350,7 @@ void FS_DefaultExtension (char *path, const char *extension, size_t size_path) // if path doesn't have a .EXT, append extension // (extension should include the .) - src = path + strlen(path) - 1; + src = path + strlen(path); while (*src != '/' && src != path) { -- 2.39.2