mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 07:34:41 +01:00
Fixed behaviour of range function
This commit is contained in:
parent
2cc6300bb5
commit
4f868e09de
@ -135,8 +135,12 @@ function pyjslib_range($start, $stop = null, $step = 1)
|
||||
|
||||
return array_reverse($arr, false);
|
||||
}
|
||||
if($step > 1 && $step > ($start - $stop)) {
|
||||
$arr = [ $start ];
|
||||
} else {
|
||||
$arr = range($start, $stop, $step);
|
||||
array_pop($arr);
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user