mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 23:32:28 +00:00
Corrected under-request of data: was erroneously supplying the size of input as the expected size of output.
This commit is contained in:
parent
481487f084
commit
b743566339
@ -66,8 +66,9 @@ CSW::CSW(const char *file_name) :
|
||||
file_data.resize(remaining_data);
|
||||
fread(file_data.data(), sizeof(uint8_t), remaining_data, file_);
|
||||
|
||||
uLongf output_length = (uLongf)remaining_data;
|
||||
uLongf output_length = (uLongf)number_of_waves;
|
||||
uncompress(source_data_.data(), &output_length, file_data.data(), file_data.size());
|
||||
source_data_.resize((size_t)output_length);
|
||||
} else {
|
||||
rle_start_ = ftell(file_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user