From 13e7b9c31e47ac5000ce6ef6ba84befe2ea75edc Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Fri, 10 Jul 2015 12:05:56 +0200 Subject: [PATCH] Use a fallback name on the client if the custom vote options don't provide one --- qcsrc/client/mapvoting.qc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 8d3874e21..6a82535e1 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -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 { -- 2.39.2