]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/command/generic.qc
Merge remote-tracking branch 'origin/mrbougo/killspree_bugfix'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / command / generic.qc
index a4389b13961b9cf4d6a991560be910f23fec25cd..b7b8da0e9f407f64da0bab06bc3dae90c7d4c528 100644 (file)
@@ -1,6 +1,6 @@
 // =========================================================
 //  Generic program common command code, written by Samual
-//  Last updated: December 28th, 2011
+//  Last updated: February 19th, 2012
 // =========================================================
 
 // used by generic commands for better help/usage information
@@ -263,6 +263,7 @@ void GenericCommand_maplist(float request, float argc)
                                        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
                                        argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
                                        
+                                       tmp_string = "";
                                        for(i = 0; i < argc; ++i)
                                                if(MapInfo_CheckMap(argv(i)))
                                                        tmp_string = strcat(tmp_string, " ", argv(i));
@@ -279,6 +280,7 @@ void GenericCommand_maplist(float request, float argc)
                                        {
                                                argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
                                                
+                                               tmp_string = "";
                                                for(i = 0; i < argc; ++i)
                                                        if(argv(i) != argv(2))
                                                                tmp_string = strcat(tmp_string, " ", argv(i));
@@ -349,6 +351,7 @@ void GenericCommand_removefromlist(float request, float argc)
                                
                                argc = tokenizebyseparator(cvar_string(original_cvar), " ");
                                
+                               tmp_string = "";
                                for(i = 0; i < argc; ++i)
                                        if(argv(i) != removal)
                                                tmp_string = strcat(tmp_string, " ", argv(i));