These take care of playername being ""
(was try to load/save ".sta" before.)


Index: configuration.c
===================================================================
--- configuration.c     (revision 1619)
+++ configuration.c     (working copy)
@@ -364,13 +364,15 @@
        }
 
        // player name
-       if (getWarzoneKeyString("playerName", sBuf))
+       getWarzoneKeyString("playerName", sBuf);
+       if (sBuf[0]!=0) //possible to have "" name
        {
                strcpy((char*)sPlayer, sBuf);
        }
        else
        {
                setWarzoneKeyString("playerName","Player");
+               strcpy((char*)sPlayer,"Player");
        }
 
        // map name


Index: multistat.c
===================================================================
--- multistat.c (revision 1619)
+++ multistat.c (working copy)
@@ -596,6 +596,8 @@
        PLAYERSTATS                     blankstats = {0};
        SAVEDPLAYERSTATS                st;
 
+       if(sPlayerName[0]==0)
+               strcpy(sPlayerName,"DefaultName");      //Force name in case 
user 
enter ""
        strcpy(fileName,MultiPlayersPath);
        strcat(fileName,sPlayerName);
        strcat(fileName,".sta");

--
Click to find great rates on home insurance, save big, shop here
http://tagline.hushmail.com/fc/Ioyw6h4d8gXmyLGJEHe0Ck4ulmVSts6c0Bf8Vf2P6drUqenu1QiOeC/


_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to