Skip to content

Commit 15d74e3

Browse files
committed
-comments
1 parent 165a97c commit 15d74e3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ext/exif/exif.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ void exif_free_image_info( image_info_type *image_info, int section_index)
859859
void add_assoc_image_info( pval *value, int sub_array, image_info_type *image_info, int section_index)
860860
{
861861
char buffer[64];
862+
int idx=0;
862863
image_info_value *info_value;
863864

864865
if ( image_info->info_list[section_index].count)
@@ -892,7 +893,11 @@ void add_assoc_image_info( pval *value, int sub_array, image_info_type *image_in
892893
break;
893894

894895
case TAG_FMT_STRING:
895-
add_assoc_string(tmpi, info_value->name, info_value->value.s, 1);
896+
if (section_index==SECTION_COMMENT) {
897+
add_index_string(tmpi, idx++, info_value->value.s, 1);
898+
} else {
899+
add_assoc_string(tmpi, info_value->name, info_value->value.s, 1);
900+
}
896901
break;
897902

898903
case TAG_FMT_BYTE:
@@ -1670,7 +1675,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo, FILE *infile)
16701675
return (ImageInfo->sections_found&(~FOUND_COMPUTED)) ? TRUE : FALSE;
16711676

16721677
case M_COM: /* Comment section */
1673-
exif_process_COM(ImageInfo, Data, itemlen);
1678+
exif_process_COM(ImageInfo, (char *)Data+2, itemlen);
16741679
break;
16751680

16761681
case M_EXIF:

0 commit comments

Comments
 (0)