From c461da0bbddee0eed6502bd9ce0a6f967a192b3b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 17 Oct 2006 17:27:15 +0000 Subject: [PATCH] fixed an off by one problem --- etemplate/inc/class.nextmatch_widget.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index 55bb513d8a..5d2e54dc61 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -227,7 +227,7 @@ unset($value['rows']['sel_options']); } } - if ($value['start'] > $total) + if ($value['start'] >= $total) { $value['start'] = 0; $total = $obj->$method($value,$value['rows'],$readonlys['rows']); @@ -447,7 +447,7 @@ } elseif ($value['last']) { - $value['start'] = (int) (($old_value['total']-2) / $max) * $max; + $value['start'] = (int) (($old_value['total']-1) / $max) * $max; unset($value['last']); $loop = True; }