Fix saving one byte at a time in Save_SPRG

This commit is contained in:
Jonathan G Rennison
2021-06-27 04:12:27 +01:00
parent be9b18df59
commit 4d0cda12bd

View File

@@ -13,6 +13,7 @@
#include "../core/bitmath_func.hpp" #include "../core/bitmath_func.hpp"
#include <vector> #include <vector>
#include "saveload.h" #include "saveload.h"
#include "saveload_buffer.h"
typedef std::vector<byte> Buffer; typedef std::vector<byte> Buffer;
@@ -197,9 +198,7 @@ static void Save_SPRG()
uint size = (uint)b.size(); uint size = (uint)b.size();
SlSetLength(size); SlSetLength(size);
for(uint i = 0; i < size; i++) { MemoryDumper::GetCurrent()->CopyBytes(b.data(), size);
SlWriteByte(b[i]); // TODO Gotta be a better way
}
} }
// We don't know the pointer values that need to be stored in various // We don't know the pointer values that need to be stored in various