]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix underflow in various commands when using an empty file name.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Mar 2015 11:49:15 +0000 (11:49 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Wed, 4 Mar 2015 15:04:40 +0000 (16:04 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12180 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a56b8363289c3c0078b0fdac7c92f6c2f0fa594c

fs.c

diff --git a/fs.c b/fs.c
index 67d13f930eeb5dc23e583dcc4f94fd10b69f2794..817780f79dec258af9ada9984557472d41748502 100644 (file)
--- 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)
        {