--- parser3/src/classes/image.C 2020/12/07 23:14:39 1.176 +++ parser3/src/classes/image.C 2020/12/07 23:18:40 1.178 @@ -26,7 +26,7 @@ #include "pa_table.h" #include "pa_charsets.h" -volatile const char * IDENT_IMAGE_C="$Id: image.C,v 1.176 2020/12/07 23:14:39 moko Exp $"; +volatile const char * IDENT_IMAGE_C="$Id: image.C,v 1.178 2020/12/07 23:18:40 moko Exp $"; // defines @@ -586,7 +586,7 @@ static void measure_jpeg(const String& o throw Exception(IMAGE_FORMAT, &origin_string, "not JPEG file - wrong signature"); while(true) { - uint segment_base=reader.tell()+2/*marker,code*/; + uint64_t segment_base=reader.tell()+2/*marker,code*/; if(reader.read(buf, sizeof(JPG_Segment_head))components_count) != 1) return false; uint value = (entry_format == 3) ? endian_to_ushort(is_big, entry->value_or_offset_to_it) : endian_to_uint(is_big, entry->value_or_offset_to_it); - (entry_tag == 256) ? info.width=value : info.height=value; + (entry_tag == 256) ? info.width=(short)value : info.height=(short)value; if(info.width && info.height) return true; }