createWindowsEnvBlock: Reduce NUL terminator count to only what's required

This code previously added 4 NUL code units, but that was likely due to a misinterpretation of this part of the CreateProcess documentation:

> A Unicode environment block is terminated by four zero bytes: two for the last string, two more to terminate the block.

(four zero *bytes* means *two* zero code units)

Additionally, the second zero code unit is only actually needed when the environment is empty due to a quirk of the CreateProcess implementation. In the case of a non-empty environment, there always ends up being two trailing NUL code units since one will come after the last environment variable in the block.
423761bb6dRyan Liptak committed on 3/18/2025, 12:53:38 AMparent2a4e06b
1 file changedLine totals unavailable