From 2abb08bd0f9de269c20c6ea61c4465ff351887d5 Mon Sep 17 00:00:00 2001 From: "Mark A. Tsuchida" Date: Thu, 2 Jul 2026 15:08:43 -0500 Subject: [PATCH] Fix GetZoomFactors default Match what the docs already say. Since only the scanner device's zoom constraints are used (as already stated in the docs), "not provided" should default to "no zoom support", which is 1.0-only. (Assisted by Claude Code; any errors are mine.) --- OpenScanLib/src/Device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenScanLib/src/Device.c b/OpenScanLib/src/Device.c index 48c37cd..d534d20 100644 --- a/OpenScanLib/src/Device.c +++ b/OpenScanLib/src/Device.c @@ -1,6 +1,7 @@ #include "InternalErrors.h" #include "OpenScanLibPrivate.h" +#include #include #include #include @@ -233,7 +234,8 @@ OScDev_NumRange *OScInternal_Device_GetZooms(OSc_Device *device) { } return ret; } - return OScInternal_NumRange_CreateContinuous(1e-6, 1e6); + return OScInternal_NumRange_CreateDiscreteFromNaNTerminated( + (double[]){1.0, NAN}); } bool OScInternal_Device_IsROIScanSupported(OSc_Device *device) {