]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix screenshot prefix updates on gamedir change
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 3 May 2011 18:33:50 +0000 (18:33 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 4 May 2011 05:37:22 +0000 (07:37 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11099 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b1ff17a02ba9bea34175b1fe914539aa08148697

fs.c

diff --git a/fs.c b/fs.c
index b5ffaf2acb31762f2ad6e4e04bcd10e5df817c15..80916b0f8f323de03f006bac22890b63e4a77cf8 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1364,11 +1364,14 @@ void FS_Rescan (void)
        // gamedirname1 (typically id1)
        FS_AddGameHierarchy (gamedirname1);
        // update the com_modname (used for server info)
-       strlcpy(com_modname, gamedirname1, sizeof(com_modname));
+       if (gamedirname2 && gamedirname2[0])
+               strlcpy(com_modname, gamedirname2, sizeof(com_modname));
+       else
+               strlcpy(com_modname, gamedirname1, sizeof(com_modname));
 
        // add the game-specific path, if any
        // (only used for mission packs and the like, which should set fs_modified)
-       if (gamedirname2)
+       if (gamedirname2 && gamedirname2[0])
        {
                fs_modified = true;
                FS_AddGameHierarchy (gamedirname2);