MusicChunk: use std::span

This commit is contained in:
Max Kellermann
2022-05-20 11:05:48 +02:00
parent b50173ae8b
commit f66315d2de
4 changed files with 7 additions and 6 deletions

View File

@@ -545,11 +545,11 @@ DecoderBridge::SubmitData(InputStream *is,
continue;
}
const size_t nbytes = std::min(dest.size, length);
const size_t nbytes = std::min(dest.size(), length);
/* copy the buffer */
memcpy(dest.data, data, nbytes);
memcpy(dest.data(), data, nbytes);
/* expand the music pipe chunk */