https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8df70629b6d99654dc71a6...
commit 8df70629b6d99654dc71a679bed8579b17de867b Author: Arnav Bhatt arnavbhatt288@gmail.com AuthorDate: Sun Jan 9 22:25:25 2022 +0530 Commit: GitHub noreply@github.com CommitDate: Sun Jan 9 17:55:25 2022 +0100
[SYSDM] Fix the "fancy" edit Environment dialog box (#4258)
Fix the issue of the changes of the environment values not being set sometimes through fancy dialog box: Make sure the environment value buffer is always reallocated before taking the values. --- dll/cpl/sysdm/environment.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dll/cpl/sysdm/environment.c b/dll/cpl/sysdm/environment.c index b648b77e775..549a41ecf85 100644 --- a/dll/cpl/sysdm/environment.c +++ b/dll/cpl/sysdm/environment.c @@ -155,7 +155,9 @@ GatherDataFromListView(HWND hwndListView, return 0; }
- /* Copy the variable values while seperating them with a semi-colon except for the last value */ + /* First reinitialize the value buffer, then copy the variable values while + * separating them with a semi-colon, except for the last value. */ + VarData->lpRawValue[0] = _T('\0'); for (i = 0; i < NumberOfItems; i++) { if (i > 0)