diff options
Diffstat (limited to 'cpp/src/IcePatch2Lib/ClientUtil.cpp')
-rw-r--r-- | cpp/src/IcePatch2Lib/ClientUtil.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2Lib/ClientUtil.cpp b/cpp/src/IcePatch2Lib/ClientUtil.cpp index abea43b2ee7..d37f6af9b98 100644 --- a/cpp/src/IcePatch2Lib/ClientUtil.cpp +++ b/cpp/src/IcePatch2Lib/ClientUtil.cpp @@ -856,8 +856,8 @@ PatcherI::updateFilesInternal(const LargeFileInfoSeq& files, const DecompressorP // 'bytes' is always returned with size '_chunkSize'. When a file is smaller than '_chunkSize' // or we are reading the last chunk of a file, 'bytes' will be larger than necessary. In this // case we calculate the current position and updated size based on the known file size. - Ice::Long size = static_cast<Ice::Long>(pos + bytes.size() > p->size ? p->size - pos : - bytes.size()); + size_t size = (pos + bytes.size()) > static_cast<size_t>(p->size) ? + static_cast<size_t>(p->size - pos) : bytes.size(); pos += size; updated += size; |