File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5229,7 +5229,7 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
52295229 mark is skipped, in all other modes, it is copied to the output
52305230 stream as-is (giving a ZWNBSP character). */
52315231 if (bo == 0 && size >= 4 ) {
5232- Py_UCS4 bom = (q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
5232+ Py_UCS4 bom = (( unsigned int ) q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
52335233 if (bom == 0x0000FEFF ) {
52345234 bo = -1 ;
52355235 q += 4 ;
@@ -5271,7 +5271,7 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
52715271 Py_ssize_t pos = writer .pos ;
52725272 if (le ) {
52735273 do {
5274- ch = (q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
5274+ ch = (( unsigned int ) q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
52755275 if (ch > maxch )
52765276 break ;
52775277 if (kind != PyUnicode_1BYTE_KIND &&
@@ -5283,7 +5283,7 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
52835283 }
52845284 else {
52855285 do {
5286- ch = (q [0 ] << 24 ) | (q [1 ] << 16 ) | (q [2 ] << 8 ) | q [3 ];
5286+ ch = (( unsigned int ) q [0 ] << 24 ) | (q [1 ] << 16 ) | (q [2 ] << 8 ) | q [3 ];
52875287 if (ch > maxch )
52885288 break ;
52895289 if (kind != PyUnicode_1BYTE_KIND &&
You can’t perform that action at this time.
0 commit comments