diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-28 16:36:56 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-29 13:58:14 -0500 |
| commit | bcd3ee7ab858d62beb36af9f5986544b68a3dd35 (patch) | |
| tree | 424c4e61a580b7c4b7481712f69ab0193d76b9c4 /src/dutil/thmutil.cpp | |
| parent | d73c29407fe5ec6a0207af7d9c2547457ae0854c (diff) | |
| download | wix-bcd3ee7ab858d62beb36af9f5986544b68a3dd35.tar.gz wix-bcd3ee7ab858d62beb36af9f5986544b68a3dd35.tar.bz2 wix-bcd3ee7ab858d62beb36af9f5986544b68a3dd35.zip | |
Clean up more 32-bit assumptions.
Diffstat (limited to 'src/dutil/thmutil.cpp')
| -rw-r--r-- | src/dutil/thmutil.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dutil/thmutil.cpp b/src/dutil/thmutil.cpp index d87e997d..d200a0ea 100644 --- a/src/dutil/thmutil.cpp +++ b/src/dutil/thmutil.cpp | |||
| @@ -1519,13 +1519,16 @@ DAPI_(HRESULT) ThemeGetTextControl( | |||
| 1519 | { | 1519 | { |
| 1520 | HRESULT hr = S_OK; | 1520 | HRESULT hr = S_OK; |
| 1521 | HWND hWnd = ::GetDlgItem(pTheme->hwndParent, dwControl); | 1521 | HWND hWnd = ::GetDlgItem(pTheme->hwndParent, dwControl); |
| 1522 | SIZE_T cbSize = 0; | ||
| 1522 | DWORD cchText = 0; | 1523 | DWORD cchText = 0; |
| 1523 | DWORD cchTextRead = 0; | 1524 | DWORD cchTextRead = 0; |
| 1524 | 1525 | ||
| 1525 | // Ensure the string has room for at least one character. | 1526 | // Ensure the string has room for at least one character. |
| 1526 | hr = StrMaxLength(*psczText, reinterpret_cast<DWORD_PTR*>(&cchText)); | 1527 | hr = StrMaxLength(*psczText, &cbSize); |
| 1527 | ThmExitOnFailure(hr, "Failed to get text buffer length."); | 1528 | ThmExitOnFailure(hr, "Failed to get text buffer length."); |
| 1528 | 1529 | ||
| 1530 | cchText = (DWORD)min(DWORD_MAX, cbSize); | ||
| 1531 | |||
| 1529 | if (!cchText) | 1532 | if (!cchText) |
| 1530 | { | 1533 | { |
| 1531 | cchText = GROW_WINDOW_TEXT; | 1534 | cchText = GROW_WINDOW_TEXT; |
