fix: Fixes infinite loop in BinaryFileWriter (#1792)

### Summary
- Fixes infinite loop with binary file writer
- Removes extra buffer copying with binary file writer
- Removes storing type counts during world save file writing
- Fixes display cache self-deletion warning during world load
This commit is contained in:
Kamron Batman 2024-05-24 14:36:43 -07:00 committed by GitHub
parent 0011db7f47
commit 9f1f314077
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 50 additions and 25 deletions

View file

@ -121,6 +121,8 @@ public interface IGenericWriter
}
void Write(Map value) => Write((byte)(value?.MapIndex ?? 0xFF));
void Write(Race value) => Write((byte)(value?.RaceIndex ?? 0xFF));
void Write(byte[] bytes);
void Write(byte[] bytes, int offset, int count);
void Write(ReadOnlySpan<byte> bytes);
unsafe void WriteEnum<T>(T value) where T : unmanaged, Enum
{