Stu's FileSearch have return values $1 and $2 swapped?
I needed something exactly like Stu's FileSearch, so I happily downloaded it from here:
http://nsis.sourceforge.net/Search_for_text_in_file
nsis.sourceforge.net/Search_for_text_in_file
And it works great! But... while the documentation for it says:
Pop $0 #Number of times found throughoutthe function actually returns yes/no in $2 and the number of lines found in $1 (i.e. $1 and $2 are actually swapped).
Pop $1 #Found at all? yes/no
Pop $2 #Number of lines found in
Is this is a bug in the documentation, or a bug in the way I use it:
Push $R9 # path\nameIf this is a bug in my use of FileSearch, what could it be?
Push "mysearchstring"
Call un.FileSearch
Pop $0 #Number of times found throughout
Pop $1 #Number of lines found in
Pop $2 #Found at all? yes/no
StrCmp $2 yes 0 LABEL_RETURNFROMCALLBACK
Delete $R9
LABEL_RETURNFROMCALLBACK:
Push $0
Thanks,
Victor