bpo-35194: Fix a wrong constant in cp932 codec (GH-10420)

This typo doesn't affect the result because wrong bits are discarded
on implicit conversion to unsigned char, but it trips UBSan
with -fsanitize=implicit-integer-truncation.





https://bugs.python.org/issue35194
This commit is contained in:
Alexey Izbyshev 2018-11-09 10:12:06 +03:00 committed by Miss Islington (bot)
parent 0f221d09ca
commit 7a69cf47a9
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ ENCODER(cp932)
if (c == 0xf8f0) if (c == 0xf8f0)
OUTBYTE1(0xa0); OUTBYTE1(0xa0);
else else
OUTBYTE1(c - 0xfef1 + 0xfd); OUTBYTE1(c - 0xf8f1 + 0xfd);
NEXT(1, 1); NEXT(1, 1);
continue; continue;
} }