Bug 5654 – BigInt returns ZERO with strings of single digit number with leading zeros
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2011-02-25T21:47:00Z
Last change time
2011-03-28T06:38:09Z
Assigned to
nobody
Creator
yangbak
Comments
Comment #0 by yangbak — 2011-02-25T21:47:20Z
import std.stdio;
import std.bigint;
void main()
{
BigInt a = "01";
writeln(a);
BigInt b = "007";
writeln(b);
BigInt c = "+0009";
writeln(c);
BigInt d = "1";
writeln(d);
BigInt e = 001;
writeln(e);
}
Output
0
0
0
1 -> Ok
1 -> Ok
// Is this related to the function fromDecimalString() from biguintcore.d??