]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use a fallback name on the client if the custom vote options don't provide one
authorMattia Basaglia <mattia.basaglia@gmail.com>
Fri, 10 Jul 2015 10:05:56 +0000 (12:05 +0200)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Fri, 10 Jul 2015 10:05:56 +0000 (12:05 +0200)
qcsrc/client/mapvoting.qc

index 8d3874e21e4a6c93896a54b9b6e0f2d09e409e62..6a82535e109909834f518223423a75d047f9fe6a 100644 (file)
@@ -541,8 +541,11 @@ void GameTypeVote_ReadOption(int i)
 
        if ( mv_flags[i] & GTV_CUSTOM )
        {
-               mv_pk3[i] = strzone(ReadString()); // name
-               mv_desc[i] = strzone(ReadString()); // description
+               string name = ReadString();
+               if ( strlen(name) < 1 )
+                       name = gt;
+               mv_pk3[i] = strzone(name);
+               mv_desc[i] = strzone(ReadString());
        }
        else
        {