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
master
tiptorrent development team 2021-09-27 13:37:31 +02:00
parent a82dc99a86
commit 9c338ce302
1 changed files with 1 additions and 1 deletions

View File

@ -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++;