summaryrefslogtreecommitdiff
path: root/oox/source/crypto/AgileEngine.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/crypto/AgileEngine.cxx')
-rw-r--r--oox/source/crypto/AgileEngine.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index ef1440f5c96e..b8a791848a49 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -179,7 +179,7 @@ bool AgileEngine::decrypt(BinaryXInputStream& aInputStream,
Decrypt aDecryptor(mKey, iv, AgileEngine::cryptoType(mInfo));
outputLength = aDecryptor.update(outputBuffer, inputBuffer, inputLength);
- sal_uInt32 writeLength = outputLength > remaining ? remaining : outputLength;
+ sal_uInt32 writeLength = std::min(outputLength, remaining);
aOutputStream.writeMemory(outputBuffer.data(), writeLength);
remaining -= outputLength;