From: Marcus M. <mei...@su...> - 2006-09-06 13:57:30
|
On Wed, Sep 06, 2006 at 03:39:30PM +0200, Jef Driesen wrote: > Jan Patera wrote: > >> case MNOTE_CANON_TAG_FOCAL_LENGTH: > >> CF (entry->format, EXIF_FORMAT_SHORT, val, maxlen); > >> n = exif_get_short (data, entry->order) / 2; > >> if (t >= n) return NULL; > >> CC (entry->components, n, val, maxlen); > >> vs = exif_get_short (entry->data + 2 + t * 2, entry->order); > >> snprintf (buf, sizeof (buf), "0x%04x", vs); > >> strncpy (val, buf, maxlen - strlen (val)); > >> break; > >> > >> But when I run the exif commandline utility, an error is reported for > >> the new tag: > >> > >> Focal type |Invalid number of components (4, expected 1). > >> > >> What am I doing wrong here? > > > > > > this message is printed by the CC macro. It checks whether > > 1st & 2nd arguments are equal. apparently entry->components is 4, > > but n is only 1. > > I knew it was reported by the CC macro, but I don't understand why it is > happening. It is exactly the same code as is used for > MNOTE_CANON_TAG_SETTINGS_1 (which also has multiple components), but no > error there! Probably I forgot to add some code somewhere else, but I > don't see it. Just a wild guess: Did you adjust mnote_canon_entry_count_values() too? Ciao, Marcus |