mirror of
https://github.com/godotengine/godot.git
synced 2024-11-12 23:24:26 +00:00
Fix undefined memcpy in AudioStreamWAV::get_data()
This commit is contained in:
parent
5ccbf6e4c7
commit
c2ea724b54
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user