Simplify and clean up find_dll_command()

The only external change here is that it now always sets *cnt to 0 when it returns NULL

Previously, it could set it to -1 in some cases, in particular when dll_commands is NULL.
This led to a bug where /HELP would show the wrong number of matching commands, because it
added the return value of find_dll_command() to the number of matching internal commands.

Also fixes a set-but-unused-variable warning.
This commit is contained in:
Kevin Easton
2017-11-27 17:18:15 +11:00
parent 860e7e28fb
commit 0ba25f02a5
2 changed files with 17 additions and 29 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2.2]
* Show correct count of matching commands in /HELP. (caf)
* Simplify rsindex() and strsearch() exported functions. (caf)
* scr-bx now lists the detached screens if there is more than one that matches