1
0
Fork 0
mirror of https://github.com/engineer-man/piston.git synced 2025-05-16 16:46:26 +02:00

Add trailing newline in stdin if it doesn't exist

This commit is contained in:
Omar Brikaa 2022-05-02 15:33:30 +02:00
parent 61a833ca3c
commit 8bb72837b9

View file

@ -44,6 +44,10 @@ class Job {
this.args = args;
this.stdin = stdin;
// Add a trailing newline if it doesn't exist
if (this.stdin.slice(-1) !== '\n') {
this.stdin += '\n';
}
this.timeouts = timeouts;
this.memory_limits = memory_limits;