diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index 3fa4a1a805..6b3b597890 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -383,11 +383,11 @@ $format = '%0'.strlen($type3).'d'; } $type3 = !$type3 ? 1 : intval($type3); // decrement - if (($type < $type2) != ($type3 > 0)) + if (($type <= $type2) != ($type3 > 0)) { $type3 = -$type3; // void infinite loop } - for ($i=0,$n=$type; $n <= $type2 && $i <= 100; $n += $type3) + for ($i=0,$n=$type; $n <= $type2 && $i <= 100; $n += $type3,++$i) { $cell['sel_options'][$n] = sprintf($format,$n); }