(Instructor) WordReplace

- Fixed: Incorrect rule for return errorlevel 1 in situation when string beginning with word to replace and its only one word in string and when uses option - deletes all found words


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4225 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-08-23 17:45:25 +00:00
parent 03bb808953
commit 27a1e0040c
2 changed files with 7 additions and 4 deletions

View file

@ -269,6 +269,9 @@ Section WordReplace
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' '' '+' $OUT
StrCmp $OUT 'C:\io. C:\logo. C:\WINDOWS' 0 error
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'C:\io.sys' '' '+' $OUT
StrCmp $OUT ' C:\logo.sys C:\WINDOWS' 0 error
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' ' ' ' ' '+1*' $OUT
StrCmp $OUT 'C:\io.sys C:\logo.sys C:\WINDOWS' 0 error

View file

@ -1,7 +1,7 @@
/*
_____________________________________________________________________________
Word Functions Header v3.0
Word Functions Header v3.1
_____________________________________________________________________________
2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
@ -808,11 +808,11 @@ VersionConvert
all:
StrCpy $5 0
StrCpy $2 $R0 $7 $5
StrCmp $2$3 '' error1
StrCmp $2 '' +4
StrCmp $2 $0 +5
StrCmp $2 $0 +6
IntOp $5 $5 + 1
goto -5
goto -4
StrCmp $R0 $R1 error1
StrCpy $R0 '$3$R0'
goto end
StrCpy $2 $R0 $5