---
wtext(int.max);
---
[email protected](2526): Range violation
Unittests in std.conv don't test wstring and big numbers.
Comment #1 by dfj1esp02 — 2009-10-01T07:43:35Z
Also I think, it's an overkill to fine tune allocation as it's done in to!string(uint)
Comment #2 by andrei — 2009-10-01T11:05:40Z
(In reply to comment #1)
> Also I think, it's an overkill to fine tune allocation as it's done in
> to!string(uint)
BTW I just improved optimization by adding preallocated strings for numbers between -1 and -9.
Comment #3 by dfj1esp02 — 2009-10-05T06:59:13Z
The bug is in line 2526 where Char.sizeof * maxlength is allocated but only maxlength is sliced for the buffer.
Comment #4 by andrei — 2009-10-05T18:39:56Z
(In reply to comment #3)
> The bug is in line 2526 where Char.sizeof * maxlength is allocated but only
> maxlength is sliced for the buffer.
Thanks! I just fixed the bug and checked in.