Small fix for the translation function.

This commit is contained in:
ruri
2019-04-06 15:50:13 +02:00
parent 95e82ac369
commit bd5b35fe09
+2 -2
View File
@@ -296,7 +296,7 @@ namespace RuriLib
if (LineParser.Lookahead(ref input) == TokenType.Boolean)
LineParser.SetBool(ref input, this);
TranslationDictionary = new Dictionary<string, string>();
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;
}
}