www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16192] New: std.conv.toChars() opSlice wrong for radix other


          Issue ID: 16192
           Summary: std.conv.toChars() opSlice wrong for radix other than
           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);


unittest does not try enough cases and accidentally passes on Intel.  Not so on

Reference: https://forum.dlang.org/thread/lmwdwkcnrbcrbmkxacej forum.dlang.org

Jun 22 2016