Skip to content

Commit 90c9228

Browse files
committed
replaced Seek(Pos-1) with Seek(-1, CUR)
1 parent 8f7c230 commit 90c9228

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

KaitaiStream.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,10 @@ public byte[] ReadBytesTerm(byte terminator, bool includeTerminator, bool consum
432432
byte b = ReadByte();
433433
if (b == terminator)
434434
{
435-
if (includeTerminator) bytes.Add(b);
436-
if (!consumeTerminator) Seek(Pos - 1);
435+
if (includeTerminator)
436+
bytes.Add(b);
437+
if (!consumeTerminator)
438+
BaseStream.Seek(-1, SeekOrigin.Current);
437439
break;
438440
}
439441
bytes.Add(b);

0 commit comments

Comments
 (0)