mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
judge: 限制compiler_text长度
This commit is contained in:
1 parent
4714d65c3f
commit
61a941b989
2 files changed
+3
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.3.13",
|
||||
"version": "2.3.14",
|
||||
"main": "package.json",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user