diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-28 18:30:00 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-29 14:53:51 -0500 |
commit | 8a8a25695351ee542f08886a9d0957c78c6af366 (patch) | |
tree | b562dbd7cd507799ba07b444cdb8a73b9eb3f299 /src/ca/XmlConfig.cpp | |
parent | 614dc57adfadcaced3973495fafd3f85115bac39 (diff) | |
download | wix-8a8a25695351ee542f08886a9d0957c78c6af366.tar.gz wix-8a8a25695351ee542f08886a9d0957c78c6af366.tar.bz2 wix-8a8a25695351ee542f08886a9d0957c78c6af366.zip |
Clean up 32-bit assumptions.
Diffstat (limited to 'src/ca/XmlConfig.cpp')
-rw-r--r-- | src/ca/XmlConfig.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/ca/XmlConfig.cpp b/src/ca/XmlConfig.cpp index 959f95b0..a1ec9d6f 100644 --- a/src/ca/XmlConfig.cpp +++ b/src/ca/XmlConfig.cpp | |||
@@ -171,7 +171,7 @@ static HRESULT ReadXmlConfigTable( | |||
171 | ExitOnFailure(hr, "failed to get component name for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId); | 171 | ExitOnFailure(hr, "failed to get component name for Wix4XmlConfig: %ls", (*ppxfcTail)->wzId); |
172 | 172 | ||
173 | // Get the component's state | 173 | // Get the component's state |
174 | if (0 < lstrlenW(pwzData)) | 174 | if (pwzData && *pwzData) |
175 | { | 175 | { |
176 | hr = StringCchCopyW((*ppxfcTail)->wzComponent, countof((*ppxfcTail)->wzComponent), pwzData); | 176 | hr = StringCchCopyW((*ppxfcTail)->wzComponent, countof((*ppxfcTail)->wzComponent), pwzData); |
177 | ExitOnFailure(hr, "failed to copy component id"); | 177 | ExitOnFailure(hr, "failed to copy component id"); |
@@ -1041,7 +1041,6 @@ extern "C" UINT __stdcall ExecXmlConfigRollback( | |||
1041 | LPWSTR pwzFileName = NULL; | 1041 | LPWSTR pwzFileName = NULL; |
1042 | LPBYTE pbData = NULL; | 1042 | LPBYTE pbData = NULL; |
1043 | DWORD_PTR cbData = 0; | 1043 | DWORD_PTR cbData = 0; |
1044 | DWORD cbDataWritten = 0; | ||
1045 | 1044 | ||
1046 | FILETIME ft; | 1045 | FILETIME ft; |
1047 | 1046 | ||
@@ -1099,12 +1098,8 @@ extern "C" UINT __stdcall ExecXmlConfigRollback( | |||
1099 | ExitOnInvalidHandleWithLastError(hFile, hr, "failed to open file: %ls", pwzFileName); | 1098 | ExitOnInvalidHandleWithLastError(hFile, hr, "failed to open file: %ls", pwzFileName); |
1100 | 1099 | ||
1101 | // Write out the old data | 1100 | // Write out the old data |
1102 | if (!::WriteFile(hFile, pbData, (DWORD)cbData, &cbDataWritten, NULL)) | 1101 | hr = FileWriteHandle(hFile, pbData, cbData); |
1103 | { | 1102 | ExitOnFailure(hr, "failed to write to file: %ls", pwzFileName); |
1104 | ExitOnLastError(hr, "failed to write to file: %ls", pwzFileName); | ||
1105 | } | ||
1106 | |||
1107 | Assert(cbData == cbDataWritten); | ||
1108 | 1103 | ||
1109 | ReleaseFile(hFile); | 1104 | ReleaseFile(hFile); |
1110 | 1105 | ||