judge: fix message truncate

This commit is contained in:
undefined committed 2022-02-12 16:34:24 +08:00
1 parent 5ffb9c4b93
commit 79839d64e5
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.13.5",
"version": "2.13.6",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+2 -2
View File
@@ -39,8 +39,8 @@ const checkers: Record<string, Checker> = {
break;
}
}
if (usr.length > 20) usrString = `${usrString.substring(0, 16)}...`;
if (std.length > 20) stdString = `${stdString.substring(0, 16)}...`;
if (usrString.length > 20) usrString = `${usrString.substring(0, 16)}...`;
if (stdString.length > 20) stdString = `${stdString.substring(0, 16)}...`;
message = { message: 'Read {0}, expect {1}.', params: [usrString, stdString] };
}
} catch (e) {