--- parser3/src/classes/image.C 2020/12/07 23:14:39 1.176 +++ parser3/src/classes/image.C 2020/12/15 17:10:28 1.179 @@ -1,7 +1,7 @@ /** @file Parser: @b image parser class. - Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -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.179 2020/12/15 17:10:28 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; }