judge: 限制compiler_text长度

This commit is contained in:
undefined committed 2021-02-26 22:28:47 +08:00
1 parent 4714d65c3f
commit 61a941b989
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -69,8 +69,8 @@ export class Queue<T> extends EventEmitter {
export function compilerText(stdout: string, stderr: string) {
const ret = [];
if (!EMPTY_STR.test(stdout)) ret.push(stdout);
if (!EMPTY_STR.test(stderr)) ret.push(stderr);
if (!EMPTY_STR.test(stdout)) ret.push(stdout.substr(0, 1024 * 1024));
if (!EMPTY_STR.test(stderr)) ret.push(stderr.substr(0, 1024 * 1024));
return ret.join('\n');
}