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;