Skip to content

Commit 2e178a1

Browse files
authored
Fix use of bitwise '&' with boolean operands in palrt (#3349)
1 parent 66f79fe commit 2e178a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/palrt/bstr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ inline HRESULT CbSysStringSize(ULONG cchSize, BOOL isByteLen, ULONG *result)
4747
else
4848
{
4949
ULONG temp = 0; // should not use in-place addition in ULongAdd
50-
if (SUCCEEDED(ULongMult(cchSize, sizeof(WCHAR), &temp)) &
50+
if (SUCCEEDED(ULongMult(cchSize, sizeof(WCHAR), &temp)) &&
5151
SUCCEEDED(ULongAdd(temp, constant, result)))
5252
{
5353
*result = *result & ~WIN32_ALLOC_ALIGN;

0 commit comments

Comments
 (0)