From 59521431b3fab534a48931527bc6e6a3053a8bd1 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 11 May 2010 15:51:15 +0000 Subject: [PATCH] two more obvious bugs in worldnamenoextension git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10192 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_parse.c | 2 +- sv_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index 04819e73..26016844 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -1794,7 +1794,7 @@ void CL_ParseServerInfo (void) // set the base name for level-specific things... this gets updated again by CL_SetupWorldModel later strlcpy(cl.worldname, cl.model_name[1], 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); diff --git a/sv_main.c b/sv_main.c index 913485b5..32abfe34 100644 --- a/sv_main.c +++ b/sv_main.c @@ -3172,7 +3172,7 @@ void SV_SpawnServer (const char *server) strlcpy (sv.name, server, sizeof (sv.name)); strlcpy(sv.worldname, modelname, sizeof(sv.worldname)); FS_StripExtension(sv.worldname, sv.worldnamenoextension, sizeof(sv.worldnamenoextension)); - strlcpy(sv.worldbasename, !strncmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 4 : sv.worldnamenoextension, sizeof(sv.worldbasename)); + strlcpy(sv.worldbasename, !strncmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 5 : sv.worldnamenoextension, sizeof(sv.worldbasename)); //Cvar_SetQuick(&sv_worldmessage, sv.worldmessage); // set later after QC is spawned Cvar_SetQuick(&sv_worldname, sv.worldname); Cvar_SetQuick(&sv_worldnamenoextension, sv.worldnamenoextension); -- 2.39.2