mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
judge: limit output length
This commit is contained in:
1 parent
aabc4c432f
commit
350716092a
3 files changed
+3
-2
No files matched your search
@@ -53,6 +53,7 @@ const checkers: Record<string, Checker> = {
|
||||
}
|
||||
}
|
||||
} else status = STATUS.STATUS_ACCEPTED;
|
||||
if (message.length > 1024000) message = '';
|
||||
return {
|
||||
score: status === STATUS.STATUS_ACCEPTED ? config.score : 0,
|
||||
status,
|
||||
|
||||
@@ -95,7 +95,7 @@ export const judge = async (ctx) => {
|
||||
status,
|
||||
time_ms: time_usage_ms,
|
||||
memory_kb: memory_usage_kb,
|
||||
message: message.join('\n'),
|
||||
message: message.join('\n').substr(0, 1024000),
|
||||
},
|
||||
});
|
||||
ctx.stat.done = new Date();
|
||||
|
||||
Reference in new issue
Block a user