In module 'env_comp()', when copying the environment variable string, the trimRight() function is being called immediately after copying the bytes equivalent to the length of the string.
The trimRight() function removes the spaces if any and then appends the NULL character, but this doesn't happen with strings that have no spaces in them, hence we add the NULL character before we send the string to be trimmed.
In module 'env_comp()', when copying the environment variable string, the trimRight() function is being called immediately after copying the bytes equivalent to the length of the string.
The trimRight() function removes the spaces if any and then appends the NULL character, but this doesn't happen with strings that have no spaces in them, hence we add the NULL character before we send the string to be trimmed.
Related to PR: https://github.com/zowe/launcher/pull/115/