Fixed problem with missing uninitialized last byte on waveform trip, closes #15316
This commit is contained in:
parent
22cd45b1d5
commit
380ee87e80
|
@ -190,6 +190,7 @@ uint8_t FileAccessWindows::get_8() const {
|
||||||
uint8_t b;
|
uint8_t b;
|
||||||
if (fread(&b, 1, 1, f) == 0) {
|
if (fread(&b, 1, 1, f) == 0) {
|
||||||
check_errors();
|
check_errors();
|
||||||
|
b = '\0';
|
||||||
};
|
};
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
|
|
|
@ -387,8 +387,9 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
|
||||||
|
|
||||||
Vector<float> new_data;
|
Vector<float> new_data;
|
||||||
new_data.resize((last - first + 1) * format_channels);
|
new_data.resize((last - first + 1) * format_channels);
|
||||||
for (int i = first * format_channels; i <= last * format_channels; i++) {
|
for (int i = first * format_channels; i < (last + 1) * format_channels; i++) {
|
||||||
new_data[i - first * format_channels] = data[i];
|
new_data[i - first * format_channels] = data[i];
|
||||||
|
setc++;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = new_data;
|
data = new_data;
|
||||||
|
|
Loading…
Reference in New Issue