bpo-35194: Fix a wrong constant in cp932 codec (GH-10420) · python/cpython@7a69cf4 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 7a69cf4
authored and
committed
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
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -40,7 +40,7 @@ ENCODER(cp932) | ||
40 | 40 | if (c == 0xf8f0) |
41 | 41 | OUTBYTE1(0xa0); |
42 | 42 | else |
43 | -OUTBYTE1(c - 0xfef1 + 0xfd); | |
43 | +OUTBYTE1(c - 0xf8f1 + 0xfd); | |
44 | 44 | NEXT(1, 1); |
45 | 45 | continue; |
46 | 46 | } |