mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
Fixed a bug with identifying a unique command index (should be 1-N, not 0-(N-1)).
This commit is contained in:
parent
8655f880f2
commit
0ae1f9f171
1 changed files with 2 additions and 2 deletions
|
|
@ -122,10 +122,10 @@ def cmdparser(raw_string, cmdset, caller, match_index=None):
|
|||
quality = [mat[4] for mat in matches]
|
||||
matches = matches[-quality.count(quality[-1]):]
|
||||
|
||||
if len(matches) > 1 and match_index != None and 0 <= match_index < len(matches):
|
||||
if len(matches) > 1 and match_index != None and 0 < match_index <= len(matches):
|
||||
# We couldn't separate match by quality, but we have an
|
||||
# index argument to tell us which match to use.
|
||||
matches = [matches[match_index]]
|
||||
matches = [matches[match_index-1]]
|
||||
|
||||
# no matter what we have at this point, we have to return it.
|
||||
return matches
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue