digitalmars.D.bugs - [Issue 16192] New: std.conv.toChars() opSlice wrong for radix other
- via Digitalmars-d-bugs (22/22) Jun 22 2016 https://issues.dlang.org/show_bug.cgi?id=16192
https://issues.dlang.org/show_bug.cgi?id=16192 Issue ID: 16192 Summary: std.conv.toChars() opSlice wrong for radix other than 10 Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: gorox comcast.net Off by one error in std.conv.toChars() opSlice() where radix != 10. The "- 1" here is wrong and fix is removing it. result.value = value >>> ((len - upr - 1) * SHIFT); https://github.com/dlang/phobos/blob/master/std/conv.d#L5736 unittest does not try enough cases and accidentally passes on Intel. Not so on ARM. Reference: https://forum.dlang.org/thread/lmwdwkcnrbcrbmkxacej forum.dlang.org --
Jun 22 2016