Fix undefined memcpy in AudioStreamWAV::get_data()

This commit is contained in:
Jason Beckmann 2024-10-03 17:48:04 -04:00
parent 5ccbf6e4c7
commit c2ea724b54

View File

@ -584,7 +584,7 @@ void AudioStreamWAV::set_data(const Vector<uint8_t> &p_data) {
Vector<uint8_t> AudioStreamWAV::get_data() const {
Vector<uint8_t> pv;
if (!data.is_empty()) {
if (data_bytes != 0) {
pv.resize(data_bytes);
memcpy(pv.ptrw(), data.ptr() + DATA_PAD, data_bytes);
}