fix undefined behaviour (int shifted too much to the left)
This commit is contained in:
parent
2e822691d7
commit
19ff8a6e97
@ -3048,7 +3048,7 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw
|
|||||||
tsize_t len; /* Output this many bytes */
|
tsize_t len; /* Output this many bytes */
|
||||||
|
|
||||||
len = raw_l + 1;
|
len = raw_l + 1;
|
||||||
val32 = *++raw_p << 24; /* Prime the pump */
|
val32 = (uint32)*++raw_p << 24; /* Prime the pump */
|
||||||
|
|
||||||
if ( --raw_l > 0 ) val32 += *(++raw_p) << 16;
|
if ( --raw_l > 0 ) val32 += *(++raw_p) << 16;
|
||||||
if ( --raw_l > 0 ) val32 += *(++raw_p) << 8;
|
if ( --raw_l > 0 ) val32 += *(++raw_p) << 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user