mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +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);
|
RuntimeInfo.Exit(ExitMessages.TerminatedByExternalProcess, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
args = args.ReplaceFirstOccurrence("%read_line ", input.ToSafeString() + " ");
|
args = args.ReplaceFirstOccurrence("%read_line", input.ToSafeString());
|
||||||
}
|
}
|
||||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,7 @@ internal class ConsoleStatements : StatementRuntimeInformation
|
|||||||
while (args.Contains("%read_key"))
|
while (args.Contains("%read_key"))
|
||||||
{
|
{
|
||||||
string input = ConsoleExtensions.ReadKey(RuntimeInfo).ToString();
|
string input = ConsoleExtensions.ReadKey(RuntimeInfo).ToString();
|
||||||
args = args.ReplaceFirstOccurrence("%read_key ", input.ToSafeString() + " ");
|
args = args.ReplaceFirstOccurrence("%read_key", input.ToSafeString());
|
||||||
}
|
}
|
||||||
RuntimeInfo.CurrentLine = args.TrimEnd();
|
RuntimeInfo.CurrentLine = args.TrimEnd();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user