Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix use of bitwise '&' with boolean operands in palrt
  • Loading branch information
HJLeee committed Sep 4, 2022
commit 259755c3c0aa9e6f0f84271e9888b200f876efbb
2 changes: 1 addition & 1 deletion src/shared/palrt/bstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ inline HRESULT CbSysStringSize(ULONG cchSize, BOOL isByteLen, ULONG *result)
else
{
ULONG temp = 0; // should not use in-place addition in ULongAdd
if (SUCCEEDED(ULongMult(cchSize, sizeof(WCHAR), &temp)) &
if (SUCCEEDED(ULongMult(cchSize, sizeof(WCHAR), &temp)) &&
SUCCEEDED(ULongAdd(temp, constant, result)))
{
*result = *result & ~WIN32_ALLOC_ALIGN;
Expand Down