if ((c2 = jpeg_transfer_1(ifile, ofile)) == EOF)
return M_EOI;
- length = (((unsigned char) c1) << 8) + ((unsigned char) c2);
+ length = (((unsigned int) c1) << 8) + ((unsigned int) c2);
length -= 2;
while (length--)
if ((c1 = ReadBlobByte(ifile)) == EOF) return M_EOI;
if ((c2 = ReadBlobByte(ifile)) == EOF) return M_EOI;
- length = (((unsigned char) c1) << 8) + ((unsigned char) c2);
+ length = (((unsigned int) c1) << 8) + ((unsigned int) c2);
length -= 2;
while (length--)