DecoderAPI: use std::min()
This commit is contained in:
parent
cd6e0ff88a
commit
26bef5d209
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user