]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix typos in last commit
authorRudolf Polzer <divverent@alientrap.org>
Wed, 15 Sep 2010 07:04:12 +0000 (09:04 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 15 Sep 2010 07:04:12 +0000 (09:04 +0200)
qcsrc/server/g_world.qc

index 73e7172d277d1a9812890b0f4c0ca2db868c27e0..9df213c1b8b3748ef74551d84b60239865dab0d3 100644 (file)
@@ -707,10 +707,14 @@ void spawnfunc_worldspawn (void)
        if(cvar("sv_curl_serverpackages_auto"))
        {
                fd = search_begin("*.serverpackage", TRUE, FALSE);
        if(cvar("sv_curl_serverpackages_auto"))
        {
                fd = search_begin("*.serverpackage", TRUE, FALSE);
-               j = search_getsize(fd);
                s = "";
                s = "";
-               for(i = 0; i < j; ++i)
-                       s = strcat(s, " ", search_getfilename(i));
+               if(fd >= 0)
+               {
+                       j = search_getsize(fd);
+                       for(i = 0; i < j; ++i)
+                               s = strcat(s, " ", search_getfilename(fd, i));
+                       search_end(fd);
+               }
                cvar_set("sv_curl_serverpackages", substring(s, 1, -1));
        }
 
                cvar_set("sv_curl_serverpackages", substring(s, 1, -1));
        }