From bd5b35fe097a564ac4b9d60bb8dd6733887418bf Mon Sep 17 00:00:00 2001 From: ruri Date: Sat, 6 Apr 2019 15:50:13 +0200 Subject: [PATCH] Small fix for the translation function. --- RuriLib/Blocks/BlockFunction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RuriLib/Blocks/BlockFunction.cs b/RuriLib/Blocks/BlockFunction.cs index 83e40f8..67a1728 100644 --- a/RuriLib/Blocks/BlockFunction.cs +++ b/RuriLib/Blocks/BlockFunction.cs @@ -296,7 +296,7 @@ namespace RuriLib if (LineParser.Lookahead(ref input) == TokenType.Boolean) LineParser.SetBool(ref input, this); TranslationDictionary = new Dictionary(); - while (LineParser.Lookahead(ref input) == TokenType.Parameter) + while (input != "" && LineParser.Lookahead(ref input) == TokenType.Parameter) { LineParser.EnsureIdentifier(ref input, "KEY"); var k = LineParser.ParseLiteral(ref input, "Key"); @@ -993,7 +993,7 @@ namespace RuriLib { var split = line.Split(new[] { ':' }, 2); var key = split[0]; - var val = split[1]; + var val = split[1].TrimStart(); TranslationDictionary[key] = val; } }