diff options
author | aunsane <aunsane@gmail.com> | 2017-04-26 22:46:37 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-04-26 22:46:37 +0300 |
commit | 6817116c9afa913b12f8198b92bb1b4082cfcb0c (patch) | |
tree | eb22ac9667f349238848b4f36ff0f28c389eaf40 /plugins/CloudFile | |
parent | 63be74b050de2eebc52c3bd38b3bd9b42d6bfe66 (diff) |
CloudFile: fix crash on zero file size
Diffstat (limited to 'plugins/CloudFile')
-rw-r--r-- | plugins/CloudFile/src/file_transfer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/CloudFile/src/file_transfer.h b/plugins/CloudFile/src/file_transfer.h index 700988eaf4..53c9ef0545 100644 --- a/plugins/CloudFile/src/file_transfer.h +++ b/plugins/CloudFile/src/file_transfer.h @@ -193,7 +193,7 @@ public: { size_t chunkSize = 1024 * 1024; if (pfts.currentFileSize < chunkSize) - chunkSize = min(pfts.currentFileSize, chunkSize / 4); + chunkSize = min(pfts.currentFileSize, chunkSize / 4, 1); else if (pfts.currentFileSize > 20 * chunkSize) chunkSize = chunkSize * 4; return chunkSize; |