Skip to content

Commit

Permalink
Merge pull request #52 from Killerrekt/master
Browse files Browse the repository at this point in the history
fix: make sure to prevent /0 for runtime calc
  • Loading branch information
Mr-Emerald-Wolf authored Sep 22, 2023
2 parents f6128de + 9b9cbc1 commit c8a4e02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/controllers/submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ class submission {
}
}
//console.log(runtime);
runtime = runtime/(tests.length-failed.length);
if(tests.length == failed.length) runtime = 0;
else runtime = runtime/(tests.length-failed.length);
//console.log(tests.length,failed.length);
runtime = runtime/multipler;
//console.log("runtime = ", runtime);
Expand Down

0 comments on commit c8a4e02

Please sign in to comment.