msi: Fixed the WriteEnvironmentStrings action
13 Jun
2007
13 Jun
'07
7:23 p.m.
+ res = RegQueryValueExW(env, name, NULL, &type, NULL, &size); + if (res != ERROR_FILE_NOT_FOUND || (res == ERROR_SUCCESS && type != REG_SZ)) + goto done; Hate to point this out but isn't this the exact same error I made in my first (and second) patch from last night? I think it should be:
if ((res != ERROR_FILE_NOT_FOUND && res != ERROR_SUCCESS) || (res == ERROR_SUCCESS && type != REG_SZ)) goto done; In your statement, if res is ERROR_SUCCESS it will always goto done no matter what the value of type, because ERROR_SUCCESS != ERROR_FILE_NOT_FOUND. Guess logic errors in if statements are contagious :) Misha
6846
Age (days ago)
6846
Last active (days ago)
0 comments
1 participants
participants (1)
-
Misha Koshelev