]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
properly strip the / from worldbasename
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 May 2010 15:47:26 +0000 (15:47 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 11 May 2010 15:47:26 +0000 (15:47 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10191 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c

index 30ee1720af3d298aa7b9d10b34e0f9804808f8af..04819e73f2b61369b7591e24cd91b8ea3acb5dd4 100644 (file)
@@ -452,7 +452,7 @@ static void CL_SetupWorldModel(void)
        {
                strlcpy(cl.worldname, cl.worldmodel->name, sizeof(cl.worldname));
                FS_StripExtension(cl.worldname, cl.worldnamenoextension, sizeof(cl.worldnamenoextension));
-               strlcpy(cl.worldbasename, !strncmp(cl.worldnamenoextension, "maps/", 5) ? cl.worldnamenoextension + 4 : cl.worldnamenoextension, sizeof(cl.worldbasename));
+               strlcpy(cl.worldbasename, !strncmp(cl.worldnamenoextension, "maps/", 5) ? cl.worldnamenoextension + 5 : cl.worldnamenoextension, sizeof(cl.worldbasename));
                Cvar_SetQuick(&cl_worldmessage, cl.worldmessage);
                Cvar_SetQuick(&cl_worldname, cl.worldname);
                Cvar_SetQuick(&cl_worldnamenoextension, cl.worldnamenoextension);