Skip to content

Commit

Permalink
feat(iris): limit judge result output
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaehyeon1020 committed Dec 7, 2024
1 parent 59d1673 commit 8d836e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/iris/src/handler/judge-handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,11 @@ func (j *JudgeHandler) judgeTestcase(idx int, dir string, validReq *Request,
res.SetJudgeExecResult(runResult.ExecResult)
res.Output = string(runResult.Output)

// Output이 1000자를 넘어가는 경우 1000자까지만 사용
if len(res.Output) > 1000 {
res.Output = res.Output[:1000]
}

if runResult.ExecResult.ResultCode != sandbox.RUN_SUCCESS {
res.SetJudgeResultCode(SandboxResultCodeToJudgeResultCode(runResult.ExecResult.ResultCode))
goto Send
Expand Down

0 comments on commit 8d836e0

Please sign in to comment.