Talk:More advanced replace text in file

From NSIS Wiki
Jump to navigationJump to search

The function was restoring the values of $0 swaped with $4 and $1 with $3. This was caused because $0, $1, $2, $3 and $4 were Exch'ed instead of Pop'ed. So after Popping $5, the stack was: $0 $1 $2 $3 (values at start) So they had to be Popped in the order they were 'pushed with Exch', kind of strange.