judge: bug fix

pull/405/head
undefined 2 years ago
parent ad050ba1fb
commit 84c7815ef6

@ -1,7 +1,7 @@
{ {
"name": "@hydrooj/hydrojudge", "name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js", "bin": "bin/hydrojudge.js",
"version": "2.22.8", "version": "2.22.9",
"main": "package.json", "main": "package.json",
"author": "undefined <i@undefined.moe>", "author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git", "repository": "https://github.com/hydro-dev/Hydro.git",

@ -141,7 +141,7 @@ class JudgeTask {
log.debug('Next: %d %o', data); log.debug('Next: %d %o', data);
data.key = 'next'; data.key = 'next';
data.rid = new ObjectID(this.rid); data.rid = new ObjectID(this.rid);
if (data.case) data.case.message = removeNixPath(data.case.message || ''); if (data.case) data.case.message ||= '';
if (typeof data.message === 'string') data.message = removeNixPath(data.message); if (typeof data.message === 'string') data.message = removeNixPath(data.message);
if (typeof data.compilerText === 'string') data.compilerText = removeNixPath(data.compilerText); if (typeof data.compilerText === 'string') data.compilerText = removeNixPath(data.compilerText);
this.ws.send(JSON.stringify(data)); this.ws.send(JSON.stringify(data));

Loading…
Cancel
Save