From 1276f1c63191620822d76d253d7964f0e15f4129 Mon Sep 17 00:00:00 2001 From: BuddyFriendGuy Date: Tue, 4 Aug 2015 01:07:28 -0400 Subject: [PATCH] fix gametype filter bug --- qcsrc/menu/xonotic/maplist.qc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/qcsrc/menu/xonotic/maplist.qc b/qcsrc/menu/xonotic/maplist.qc index 875ef7bd3..b8b24777d 100644 --- a/qcsrc/menu/xonotic/maplist.qc +++ b/qcsrc/menu/xonotic/maplist.qc @@ -240,11 +240,15 @@ void XonoticMapList_refilter(entity me) { j = MapInfo_FindName(argv(i)); if(j >= 0) - s = strcat( - substring(s, 0, j), - "1", - substring(s, j+1, MapInfo_count - (j+1)) - ); + { + // double check that the two mapnames are "identical", not just share the same prefix + if (strlen(MapInfo_BSPName_ByID(j)) == strlen(argv(i))) + s = strcat( + substring(s, 0, j), + "1", + substring(s, j+1, MapInfo_count - (j+1)) + ); + } } me.g_maplistCache = strzone(s); if(gt != me.lastGametype || f != me.lastFeatures) -- 2.39.2