[Issue 16408] [REG2.065] Converting char* to string with std.conv.to!string is wrong in release mode
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Aug 21 06:03:15 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16408
--- Comment #4 from Lodovico Giaretta <lodovico at giaretart.net> ---
(In reply to Matt Jones from comment #2)
> Interesting. Changing from std.conv.to!string to std.string.fromStringz
> returns "DDDD" for both debug and release mode.
ag0aep6g's comment (https://issues.dlang.org/show_bug.cgi?id=16408#c3) is
correct.
The fact that SDL_GetKeyName always returns the same buffer explains why
fromStringz gives the wrong answer in both debug and release.
So I agree that this is a wrong-code bug.
--
More information about the Digitalmars-d-bugs
mailing list