aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-08-29 11:35:29 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-08-29 11:35:29 +0000
commiteee15f6c6cc793c190d69e3202aaf28e20cdcc33 (patch)
tree9910e9e9219f6c606007e31a1a1db909743df9f3 /src
parent89826fe55b3345238c1a9f27f6529641eccfd4c6 (diff)
downloadboca-eee15f6c6cc793c190d69e3202aaf28e20cdcc33.tar.gz
boca-eee15f6c6cc793c190d69e3202aaf28e20cdcc33.zip
bug fix
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