From b569c3a309ddcba0e3bc17f66d59d4f1a770bf53 Mon Sep 17 00:00:00 2001 From: Dirk-Willem van Gulik Date: Mon, 17 Jan 2022 20:59:23 +0100 Subject: [PATCH] change how we determine the extensions; to deal with things like foo.ino.hex; or foo.sig.hex which are increasingly common. (Fixes #150) --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 33e2acc..ecb20f1 100644 --- a/main.c +++ b/main.c @@ -151,7 +151,7 @@ void dump_pgms(programmer_t *pgms) { } bool is_ext(const char *filename, const char *ext) { - char *ext_begin = strrchr(filename, '.'); + char *ext_begin = rindex(filename, '.'); return(ext_begin && strcmp(ext_begin, ext) == 0); }