From 6521e952b67ee2aac02182d495560f9ee627e79e Mon Sep 17 00:00:00 2001 From: Christopher Mohen Date: Mon, 19 Feb 2024 19:36:31 -0500 Subject: [PATCH] Update Database.cs Wrapping around can seek so non-ztsd streams can still report position --- LSLib/LS/Story/Database.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LSLib/LS/Story/Database.cs b/LSLib/LS/Story/Database.cs index b23ce7f0..bf96f31f 100644 --- a/LSLib/LS/Story/Database.cs +++ b/LSLib/LS/Story/Database.cs @@ -203,7 +203,10 @@ public void Read(OsiReader reader) Parameters = new ParameterList(); Parameters.Read(reader); - FactsPosition = reader.BaseStream.Position; + if (reader.BaseStream.CanSeek) + { + FactsPosition = reader.BaseStream.Position; + } Facts = new FactCollection(this, reader.Story); reader.ReadList(Facts); }