Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Commit f7cab51

Browse files
committed
fixed bug with scene resolution when one scene has no conditionals
1 parent 44ed5f1 commit f7cab51

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Ficdown.Parser/Ficdown.Parser.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<PackageReference Include="Epub4Net" Version="1.2.0" />
1414
<PackageReference Include="Ionic.Zip" Version="1.9.1.8" />
1515
<PackageReference Include="Markdig" Version="0.17.1" />
16+
<PackageReference Include="System.Security.Permissions" />
1617
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
1718
</ItemGroup>
1819
</Project>

Ficdown.Parser/Player/StateManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private Scene GetScene(string blockName, Anchor anchor, string target, BitArray
182182
{
183183
if (ConditionsMatch(scene, playerState) &&
184184
(newScene == null || newScene.Conditions == null ||
185-
scene.Conditions.Count > newScene.Conditions.Count))
185+
(scene.Conditions != null && scene.Conditions.Count > newScene.Conditions.Count)))
186186
{
187187
newScene = scene;
188188
}

0 commit comments

Comments
 (0)