diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-17 17:13:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 17:13:34 (GMT) |
commit | d7c657d4b121164caa439253da5266b2e29a1bed (patch) | |
tree | df3c97b7bb9290d15ff7d598f36ff089cbbdbcb5 /Objects/stringlib/codecs.h | |
parent | 1a1bd2e23871619adc1405e1cdc7c1e61252fd2c (diff) | |
download | cpython-d7c657d4b121164caa439253da5266b2e29a1bed.zip cpython-d7c657d4b121164caa439253da5266b2e29a1bed.tar.gz cpython-d7c657d4b121164caa439253da5266b2e29a1bed.tar.bz2 |
bpo-40302: UTF-32 encoder SWAB4() macro use a|b rather than a+b (GH-19572)
Diffstat (limited to 'Objects/stringlib/codecs.h')
-rw-r--r-- | Objects/stringlib/codecs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h index 208e8fe..9b2a29b 100644 --- a/Objects/stringlib/codecs.h +++ b/Objects/stringlib/codecs.h @@ -743,7 +743,7 @@ STRINGLIB(SWAB4)(STRINGLIB_CHAR ch) return (word << 24); #elif STRINGLIB_SIZEOF_CHAR == 2 /* high bytes are zero */ - return ((word & 0x00FFu) << 24) + ((word & 0xFF00u) << 8); + return ((word & 0x00FFu) << 24) | ((word & 0xFF00u) << 8); #else return _Py_bswap32(word); #endif |