diff options
Diffstat (limited to 'internal/game/cmd_bank.go')
| -rw-r--r-- | internal/game/cmd_bank.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/game/cmd_bank.go b/internal/game/cmd_bank.go index bb03869..76fefb7 100644 --- a/internal/game/cmd_bank.go +++ b/internal/game/cmd_bank.go @@ -265,10 +265,15 @@ func (g *Game) doBankWithdraw(sess *net.Session, input string) { return } - for _, e := range entries { - def, _ := g.ItemStore.Load(e.id) - if def != nil && def.MatchesName(input) { - matches = append(matches, e) + // Only fall back to fuzzy MatchesName when the prefix pass found nothing; + // running it unconditionally appended the same entries twice and printed a + // duplicated ambiguity list. + if len(matches) == 0 { + for _, e := range entries { + def, _ := g.ItemStore.Load(e.id) + if def != nil && def.MatchesName(input) { + matches = append(matches, e) + } } } |
