From: Jan P. <pa...@us...> - 2004-05-13 13:58:35
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11513/libexif Modified Files: exif-data.c Log Message: 2004-05-13 Jan Patera <pa...@us...> * libexif/exif-data.c: Fill tag data with zeros on save even if 0 components (buggy Kodak-210) Index: exif-data.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-data.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- exif-data.c 11 May 2004 15:15:26 -0000 1.39 +++ exif-data.c 13 May 2004 13:58:23 -0000 1.40 @@ -180,8 +180,6 @@ * the entry but somewhere else. */ s = exif_format_get_size (e->format) * e->components; - if (!s) - return; if (s > 4) { doff = *ds - 6; *ds += s; @@ -192,7 +190,7 @@ doff = offset + 8; /* Write the data. Fill unneeded bytes with 0. */ - memcpy (*d + 6 + doff, e->data, e->size); + memcpy (*d + 6 + doff, e->data, s); if (s < 4) memset (*d + 6 + doff + s, 0, (4 - s)); } |