From 970f32089432c4a4bbde186816c01b7706892b08 Mon Sep 17 00:00:00 2001 From: Egor Shestakov Date: Thu, 20 Mar 2025 16:10:41 +0700 Subject: [PATCH] fix pointer type mistake in find_calibration loop --- src/dcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dcp.c b/src/dcp.c index 834e4d8..05abc76 100644 --- a/src/dcp.c +++ b/src/dcp.c @@ -24,8 +24,8 @@ find_calibration(size_t size, char *conffile, const char *sensor) DATADIR "/megapixels/config/%s,%s.dcp", NULL }; - for (const char *fmt = paths[0]; fmt; fmt++) { - snprintf(conffile, size, fmt, model, sensor); + for (const char **fmt = paths; *fmt; fmt++) { + snprintf(conffile, size, *fmt, model, sensor); if (access(conffile, F_OK) != -1) { printf("Found calibration file at %s\n", conffile); return true;