Bug 7982 – iota broken when start and end are unsigned and step is negative.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-24T14:22:00Z
Last change time
2012-05-30T18:47:37Z
Keywords
pull
Assigned to
nobody
Creator
eco

Comments

Comment #0 by eco — 2012-04-24T14:22:13Z
iota.length doesn't properly handle unsigned values when the end is < the start (as is the case when using a reverse iota). I already know the problem, I just don't want to forget about it. I'll see about making a fix for it soon.
Comment #1 by eco — 2012-05-04T14:05:29Z
Comment #2 by github-bugzilla — 2012-05-27T19:50:06Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/ebcba68f7bddbf66aa845bc956607aaa84994b82 fix Issue 7982 - unsigned reverse iota broken iota.length needs to take into account unsigned values when the end is greater than the start. https://github.com/D-Programming-Language/phobos/commit/613d10f1b29a7a1c4a5abf97982ca0c9d59df045 Merge pull request #566 from eco/unsigned-reverse-iota fix Issue 7982 - unsigned reverse iota broken