From 7441fcdcd669ddf4b23d60807315c927e5b7ee0f Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Sun, 19 Apr 2015 12:34:36 +0100 Subject: [PATCH] Fixed single character Say text not parsing correctly --- Assets/Fungus/Narrative/Scripts/DialogParser.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/Fungus/Narrative/Scripts/DialogParser.cs b/Assets/Fungus/Narrative/Scripts/DialogParser.cs index e63b2715..09fca4a2 100644 --- a/Assets/Fungus/Narrative/Scripts/DialogParser.cs +++ b/Assets/Fungus/Narrative/Scripts/DialogParser.cs @@ -67,11 +67,14 @@ namespace Fungus position = m.Index + tagText.Length; m = m.NextMatch(); } - - if (position < storyText.Length - 1) + + if (position < storyText.Length) { string postText = storyText.Substring(position, storyText.Length - position); - AddWordsToken(tokens, postText); + if (postText.Length > 0) + { + AddWordsToken(tokens, postText); + } } }