diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-25 08:49:13 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-25 08:49:13 +0200 |
commit | e544bc24b2552d826ee3d732dee59ea90e9b7e5f (patch) | |
tree | a0b4d4184feadaac5816263542b17e8aec39f2b3 /src/app.c | |
parent | e8c65a9cc9aee8f49df01e0452516adb1eb7f289 (diff) |
App: Cleanup
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -756,7 +756,8 @@ const iString *downloadPathForUrl_App(const iString *url, const iString *mime) { | |||
756 | } | 756 | } |
757 | } | 757 | } |
758 | else { | 758 | else { |
759 | iRangecc fn = { parts.path.start + lastIndexOfCStr_Rangecc(parts.path, "/") + 1, | 759 | const size_t slashPos = lastIndexOfCStr_Rangecc(parts.path, "/"); |
760 | iRangecc fn = { parts.path.start + (slashPos != iInvalidPos ? slashPos + 1 : 0), | ||
760 | parts.path.end }; | 761 | parts.path.end }; |
761 | if (!isEmpty_Range(&fn)) { | 762 | if (!isEmpty_Range(&fn)) { |
762 | setRange_String(name, fn); | 763 | setRange_String(name, fn); |