diff --git a/camlibs/sierra/ChangeLog b/camlibs/sierra/ChangeLog index f4f3d715c..3da514ed2 100644 --- a/camlibs/sierra/ChangeLog +++ b/camlibs/sierra/ChangeLog @@ -1,3 +1,10 @@ +2002-02-18 Lutz Müller + + Reported by Patrick Mansfield : + + * library.c (sierra_read_packet): At least Nikon CoolPix 880 sets + the checksum always to 0xffff (?!?). + 2002-02-11 Lutz Müller * Makefile.am: As long as there is EXIF code in here, add diff --git a/camlibs/sierra/library.c b/camlibs/sierra/library.c index 9668386b5..61bcdd04e 100644 --- a/camlibs/sierra/library.c +++ b/camlibs/sierra/library.c @@ -566,6 +566,16 @@ sierra_read_packet (Camera *camera, unsigned char *packet, GPContext *context) c &= 0xffff; if (c == (packet[br - 2] + (packet[br - 1] * 256))) break; + + /* + * At least the Nikon CoolPix 880 sets the checksum + * always to 0xffff. In that case, we can't check it + * and return successfully. + */ + if ((packet[br - 2] == 0xff) && + (packet[br - 1] == 0xff)) + break; + GP_DEBUG ("Checksum wrong (calculated 0x%x, " "found 0x%x)!", c, packet[br - 2] + (packet[br - 1] * 256));