From 6935983b710baf8b6a2e5d3ea82b309317b56204 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Sun, 14 Oct 2018 18:00:46 -0500 Subject: [PATCH] Add Seek to AllocationTableStream --- LibHac/Save/AllocationTableStream.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/LibHac/Save/AllocationTableStream.cs b/LibHac/Save/AllocationTableStream.cs index c8bcdf8c..49785789 100644 --- a/LibHac/Save/AllocationTableStream.cs +++ b/LibHac/Save/AllocationTableStream.cs @@ -53,7 +53,20 @@ namespace LibHac.Save public override long Seek(long offset, SeekOrigin origin) { - throw new NotImplementedException(); + switch (origin) + { + case SeekOrigin.Begin: + Position = offset; + break; + case SeekOrigin.Current: + Position += offset; + break; + case SeekOrigin.End: + Position = Length - offset; + break; + } + + return Position; } public override void SetLength(long value)