aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decoder/DecoderAPI.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx
index 4d0b2fd48..c3cbb3a21 100644
--- a/src/decoder/DecoderAPI.cxx
+++ b/src/decoder/DecoderAPI.cxx
@@ -519,9 +519,7 @@ decoder_data(Decoder &decoder,
continue;
}
- size_t nbytes = dest.size;
- if (nbytes > length)
- nbytes = length;
+ const size_t nbytes = std::min(dest.size, length);
/* copy the buffer */