summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-27 13:37:31 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:49:25 +0200
commit9c338ce302d42ae9a899fffa02835bdb26d5ec04 (patch)
treeb3269d051f463e45170957009a27bbbc3a240462 /src
parenta82dc99a86d91fe1b0f950d343482eaf30acb269 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/handler.c2
1 files changed, 1 insertions, 1 deletions
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++;