From 39e5a5a81d68c653b50b7678b1afeab85a5cc891 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 14 Jun 2024 07:49:30 +0200 Subject: [PATCH] Fix load error when trying to parse non-json file as quest --- QuestPaths/AssemblyQuestLoader.cs | 7 +++++-- Questionable/Questionable.csproj | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/QuestPaths/AssemblyQuestLoader.cs b/QuestPaths/AssemblyQuestLoader.cs index 460e1971..95faeb46 100644 --- a/QuestPaths/AssemblyQuestLoader.cs +++ b/QuestPaths/AssemblyQuestLoader.cs @@ -17,8 +17,11 @@ public static class AssemblyQuestLoader new ZipArchive(typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream(resourceName)!); foreach (ZipArchiveEntry entry in zipArchive.Entries) { - using Stream stream = entry.Open(); - loadFunction(entry.Name, stream); + if (entry.Name.EndsWith(".json")) + { + using Stream stream = entry.Open(); + loadFunction(entry.Name, stream); + } } } } diff --git a/Questionable/Questionable.csproj b/Questionable/Questionable.csproj index d9484247..2e9031b4 100644 --- a/Questionable/Questionable.csproj +++ b/Questionable/Questionable.csproj @@ -1,7 +1,7 @@  net8.0-windows - 0.13 + 0.14 12 enable true