aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/private/autojudging.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/private/autojudging.php b/src/private/autojudging.php
index d8580b5..afe0d05 100755
--- a/src/private/autojudging.php
+++ b/src/private/autojudging.php
@@ -603,7 +603,9 @@ while(42) {
}
if($retval >= 7 && $retval <= 9) {
$ans = file("allout");
- $anstmp = substr(trim(escape_string($ans[count($ans)-1])),0,100);
+ $anstmp = '';
+ if(count($ans) > 0)
+ $anstmp = substr(trim(escape_string($ans[count($ans)-1])),0,100);
unset($ans);
$answer = "(probably runtime error - unusual code: $retval) " . $anstmp;
// runtime error