Permalink
Browse files

Possible infinite loop.

  • Loading branch information...
kakserpom committed Dec 8, 2010
1 parent df1ddfa commit 24ae0fad6df6ad45bd7a21c653ab40faf53d8e55
Showing with 4 additions and 1 deletion.
  1. +4 −1 mctop
View
5 mctop
@@ -167,7 +167,10 @@ for (;;)
$average = array();
$total = array();
$j = $c;
- while (!$row || isset($row['_'])) {$row = $srvtable[--$j];}
+ while (!$row || isset($row['_'])) {
+ $row = $srvtable[--$j];
+ if ($j <= 0) {break;}
+ }
foreach ($row as $k => $v)
{
if (substr($k,0,1) == '_') {continue;}

0 comments on commit 24ae0fa

Please sign in to comment.