TRIM function from the documentation.
In the documentation that comes with NSIS can be found a function called TrimNewLines. Has anyone ever passed that function a string that doesn't contain a trailing CRLF (or any variant thereof)? The results that I've experienced indicate that given a string with no trailing CR or LF characters, the function will quite happily return a null string.
Maybe it's the way I'm invoking it, but I don't think so. In the following, the function's renamed TrimCRLF and my string is in R1:
push $R1
call TrimCRLF
pop $R1
That's all that I'm doing to use it. Attached is the old code and revised code that seems to fix the problem. The problem seems to be that if CR or LF are not found, it decides to return a string of MaxLen 0.