mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 00:56:31 +02:00
Fix remove extra spaces from %read_line and %read_key replacements
This commit is contained in:
@@ -41,7 +41,7 @@ internal class ConsoleStatements : StatementRuntimeInformation
|
||||
RuntimeInfo.Exit(ExitMessages.TerminatedByExternalProcess, true);
|
||||
return;
|
||||
}
|
||||
args = args.ReplaceFirstOccurrence("%read_line ", input.ToSafeString() + " ");
|
||||
args = args.ReplaceFirstOccurrence("%read_line", input.ToSafeString());
|
||||
}
|
||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||
}
|
||||
@@ -53,7 +53,7 @@ internal class ConsoleStatements : StatementRuntimeInformation
|
||||
while (args.Contains("%read_key"))
|
||||
{
|
||||
string input = ConsoleExtensions.ReadKey(RuntimeInfo).ToString();
|
||||
args = args.ReplaceFirstOccurrence("%read_key ", input.ToSafeString() + " ");
|
||||
args = args.ReplaceFirstOccurrence("%read_key", input.ToSafeString());
|
||||
}
|
||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user