From 34bc6b1613fee3d72a2940dfdd5acad6def434fb Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 3 Nov 2022 21:31:24 +0100 Subject: [PATCH] Use the macro for encoding firmware versions This makes it a bit easer to quickly locate the workarounds for specific firmware versions. --- src/hw_ostc3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hw_ostc3.c b/src/hw_ostc3.c index e8dc223..467a64d 100644 --- a/src/hw_ostc3.c +++ b/src/hw_ostc3.c @@ -770,7 +770,7 @@ hw_ostc3_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, voi if (!compact) { // Workaround for a bug in older firmware versions. unsigned int firmware = array_uint16_be (header + offset + 0x30); - if (firmware < 93) + if (firmware < OSTC3FW(0,93)) length -= 3; } if (length < RB_LOGBOOK_SIZE_FULL) { @@ -818,7 +818,7 @@ hw_ostc3_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, voi if (!compact) { // Workaround for a bug in older firmware versions. unsigned int firmware = array_uint16_be (header + offset + 0x30); - if (firmware < 93) + if (firmware < OSTC3FW(0,93)) length -= 3; }