File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4944,7 +4944,7 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
49444944 mark is skipped, in all other modes, it is copied to the output
49454945 stream as-is (giving a ZWNBSP character). */
49464946 if (bo == 0 && size >= 4 ) {
4947- Py_UCS4 bom = (q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
4947+ Py_UCS4 bom = (( unsigned int ) q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
49484948 if (bom == 0x0000FEFF ) {
49494949 bo = -1 ;
49504950 q += 4 ;
@@ -4986,7 +4986,7 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
49864986 Py_ssize_t pos = writer .pos ;
49874987 if (le ) {
49884988 do {
4989- ch = (q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
4989+ ch = (( unsigned int ) q [3 ] << 24 ) | (q [2 ] << 16 ) | (q [1 ] << 8 ) | q [0 ];
49904990 if (ch > maxch )
49914991 break ;
49924992 if (kind != PyUnicode_1BYTE_KIND &&
@@ -4998,7 +4998,7 @@ PyUnicode_DecodeUTF32Stateful(const char *s,
49984998 }
49994999 else {
50005000 do {
5001- ch = (q [0 ] << 24 ) | (q [1 ] << 16 ) | (q [2 ] << 8 ) | q [3 ];
5001+ ch = (( unsigned int ) q [0 ] << 24 ) | (q [1 ] << 16 ) | (q [2 ] << 8 ) | q [3 ];
50025002 if (ch > maxch )
50035003 break ;
50045004 if (kind != PyUnicode_1BYTE_KIND &&
You can’t perform that action at this time.
0 commit comments