From f7cab514cce6d75a8129b13382f6486763b885ee Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Sun, 10 May 2020 12:00:32 -0500 Subject: [PATCH] fixed bug with scene resolution when one scene has no conditionals --- Ficdown.Parser/Ficdown.Parser.csproj | 1 + Ficdown.Parser/Player/StateManager.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Ficdown.Parser/Ficdown.Parser.csproj b/Ficdown.Parser/Ficdown.Parser.csproj index 7ef2714..aecfc99 100644 --- a/Ficdown.Parser/Ficdown.Parser.csproj +++ b/Ficdown.Parser/Ficdown.Parser.csproj @@ -13,6 +13,7 @@ + diff --git a/Ficdown.Parser/Player/StateManager.cs b/Ficdown.Parser/Player/StateManager.cs index da73e95..92a709d 100644 --- a/Ficdown.Parser/Player/StateManager.cs +++ b/Ficdown.Parser/Player/StateManager.cs @@ -182,7 +182,7 @@ { if (ConditionsMatch(scene, playerState) && (newScene == null || newScene.Conditions == null || - scene.Conditions.Count > newScene.Conditions.Count)) + (scene.Conditions != null && scene.Conditions.Count > newScene.Conditions.Count))) { newScene = scene; }