diff options
Diffstat (limited to 'Objects/rangeobject.c')
| -rw-r--r-- | Objects/rangeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 5203f40..baa8dee 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -30,11 +30,11 @@ get_len_of_range(long lo, long hi, long step) ---------------------------------------------------------------*/ assert(step != 0); if (step > 0 && lo < hi) - return 1UL + (hi - 1UL - lo) / step; + return 1UL + (hi - 1UL - lo) / step; else if (step < 0 && lo > hi) - return 1UL + (lo - 1UL - hi) / (0UL - step); + return 1UL + (lo - 1UL - hi) / (0UL - step); else - return 0UL; + return 0UL; } /* Return a stop value suitable for reconstructing the xrange from |
