From ebee69678b52d4e5731ae1e8237178d949745523 Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Tue, 24 May 2022 02:40:46 +0500 Subject: [PATCH] Fix: get longest extension --- ctpv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctpv.c b/ctpv.c index 20ff61b..73a2013 100644 --- a/ctpv.c +++ b/ctpv.c @@ -66,7 +66,7 @@ static const char *get_ext(char const *path) else base = path; - const char *dot = strrchr(path, '.'); + const char *dot = strchr(base, '.'); if (!dot || dot == base) return NULL;