mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 19:44:57 +00:00
DolphinWX: Fix exporting of Wii save files
This would trip an out of bounds assert due the fact that the size is reserved, but the vector is not actually resized.
This commit is contained in:
parent
ea7eee1f58
commit
22c7664aaf
1 changed files with 3 additions and 4 deletions
|
@ -445,10 +445,9 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
|
|||
m_valid = false;
|
||||
}
|
||||
|
||||
std::vector<u8> file_data, file_data_enc;
|
||||
file_data.reserve(file_size_rounded);
|
||||
file_data_enc.reserve(file_size_rounded);
|
||||
memset(&file_data[0], 0, file_size_rounded);
|
||||
std::vector<u8> file_data(file_size_rounded);
|
||||
std::vector<u8> file_data_enc(file_size_rounded);
|
||||
|
||||
if (!raw_save_file.ReadBytes(&file_data[0], file_size))
|
||||
{
|
||||
ERROR_LOG(CONSOLE, "Failed to read data from file: %s",
|
||||
|
|
Loading…
Add table
Reference in a new issue