From 9c338ce302d42ae9a899fffa02835bdb26d5ec04 Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Mon, 27 Sep 2021 13:37:31 +0200 Subject: use strrchr to take last dot that specifies the chunk number file might have a extension starting by dot, use strrchr to get the last dot that specifies the chunk number --- src/handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/handler.c') diff --git a/src/handler.c b/src/handler.c index 97f54b5..982ad02 100644 --- a/src/handler.c +++ b/src/handler.c @@ -113,7 +113,7 @@ int tip_client_state_process_payload(struct tip_client *cli) } /* get chunk number from file extension, e.g. FILE.0 */ - chunk = strchr(uri, '.'); + chunk = strrchr(uri, '.'); if (chunk) { *chunk = '\0'; chunk++; -- cgit v1.2.3-18-g5258