diff --git a/src/mares_iconhd.c b/src/mares_iconhd.c index 93b2dfc..02a13ad 100644 --- a/src/mares_iconhd.c +++ b/src/mares_iconhd.c @@ -478,6 +478,8 @@ mares_iconhd_extract_dives (dc_device_t *abstract, const unsigned char data[], u break; } if (eop < layout->rb_profile_begin || eop >= layout->rb_profile_end) { + if (eop == 0xFFFFFFFF) + return DC_STATUS_SUCCESS; // No dives available. ERROR (context, "Ringbuffer pointer out of range (0x%08x).", eop); return DC_STATUS_DATAFORMAT; } diff --git a/src/serial_posix.c b/src/serial_posix.c index e0e609a..e9b7295 100644 --- a/src/serial_posix.c +++ b/src/serial_posix.c @@ -417,7 +417,7 @@ serial_configure (serial_t *device, int baudrate, int databits, int parity, int } // Apply the new settings. - if (tcsetattr (device->fd, TCSANOW, &tty) != 0) { + if (tcsetattr (device->fd, TCSANOW, &tty) != 0 && NOPTY) { #if 0 // who cares SYSERROR (device->context, errno); return -1;