From 51511529ba4757fb99355c5f82a03c1f8d786105 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sat, 9 Mar 2013 12:05:10 -0500 Subject: [PATCH] Fixed bug in region loader that incorrectly tries to pad out non-multiple-of-4KB files. --- SubstrateCS/Source/Core/RegionFile.cs | 1 + 1 file changed, 1 insertion(+) 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); }