[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 16 10:59:38 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=18290
Răzvan Ștefănescu <rumbu at rumbu.ro> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #4 from Răzvan Ștefănescu <rumbu at rumbu.ro> ---
to!string(int.min, 16) returns "80000000"
So, please tell me, which is the hex representation of int.min (-2147483648)?
Where do I put the "-" sign? Because, you know, +2147483648 is not an integer,
it's a long.
Just to play dumb, taking your advice to put a "-" before:
parse!int("-80000000", 16) returns 0 :)
--
More information about the Digitalmars-d-bugs
mailing list