diff options
Diffstat (limited to 'onlineupdate')
-rw-r--r-- | onlineupdate/source/update/updater/bspatch.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/onlineupdate/source/update/updater/bspatch.cxx b/onlineupdate/source/update/updater/bspatch.cxx index b39c50f92627..10ec56200511 100644 --- a/onlineupdate/source/update/updater/bspatch.cxx +++ b/onlineupdate/source/update/updater/bspatch.cxx @@ -104,7 +104,7 @@ MBS_ApplyPatch(const MBSPatchHeader *header, FILE* patchFile, unsigned char *wb = buf; while (r) { - const size_t count = (r > SSIZE_MAX) ? SSIZE_MAX : r; + const size_t count = std::min(r, SSIZE_MAX); size_t c = fread(wb, 1, count, patchFile); if (c != count) { |