diff --git a/SubstrateCS/Source/Core/RegionFile.cs b/SubstrateCS/Source/Core/RegionFile.cs index 84f92cf..8db324a 100644 --- a/SubstrateCS/Source/Core/RegionFile.cs +++ b/SubstrateCS/Source/Core/RegionFile.cs @@ -127,6 +127,7 @@ namespace Substrate.Core if ((file.Length & 0xfff) != 0) { /* the file size is not a multiple of 4KB, grow it */ + file.Seek(0, SeekOrigin.End); for (int i = 0; i < (file.Length & 0xfff); ++i) { file.WriteByte(0); }