From 581d7309b66fae98f587b532843666dafacd2342 Mon Sep 17 00:00:00 2001 From: avolkov Date: Sat, 22 May 2010 19:45:39 +0000 Subject: [PATCH] Do not match singular stars when given a prefix in star search; bug #1071 git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3540 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/uqm/planets/pstarmap.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 49d12270a..ac4555548 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Do not match singular stars when given a prefix in star search + (bug #1071) - Alex - Preserve character case when editing with joystick (bug #1080) - Alex - Fixed misaligned cargo count (bug #1092) - Coredev - Fixed the network SuperMelee team configuration protocol - SvdB diff --git a/sc2/src/uqm/planets/pstarmap.c b/sc2/src/uqm/planets/pstarmap.c index 2c7e30ed8..53eb8d03d 100644 --- a/sc2/src/uqm/planets/pstarmap.c +++ b/sc2/src/uqm/planets/pstarmap.c @@ -975,9 +975,13 @@ FindNextStarIndex (STAR_SEARCH_STATE *pSS, int from, BOOLEAN WithinClust) continue; } - if (!SDPtr->Prefix || WithinClust) - // singular star - prefix not checked - // or searching within clusters + if (pSS->Prefix && !SDPtr->Prefix) + // we were given a prefix but found a singular star; + // that is a no match + continue; + + if (WithinClust) + // searching within clusters; any prefix is a match break; if (!pSS->Prefix)