[Issue 1219] long.max.stringof gets corrupted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 7 07:42:16 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1219





------- Comment #1 from fvbommel at wxs.nl  2007-05-07 09:42 -------
Another interesting case, likely related:
---
import std.stdio;
import std.string;

void main() {
    writefln(long.max.stringof);
    writefln(ulong.max.stringof);
}
---
The first three bytes of long.max.stringof seem to be overwritten by "-1\0".
ulong.max.stringof is incorrectly displayed as "-1".
If you change the order, the first three characters of long.max.stringof
overwrite the characters of ulong.max.stringof (including the trailing \0).


-- 



More information about the Digitalmars-d-bugs mailing list