std.regex: bug or something special?

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Feb 14 10:32:35 PST 2013


On Thu, Feb 14, 2013 at 07:24:32PM +0100, Lubos Pintes wrote:
> Hi,
> I am reading std.regex. I found the following code on line 671:
>         else if('A' <= current && current <= 'Z')
>             val = val * 16 + current - 'A' + 10;
> 
> Hex digits are parsed there. So unles this is something special,
> this is a bug. Because for example what 'J' would mean in this
> context?

Looks like a bug. The last clause of the if-condition should check <=
'F', not <= 'Z'.

Please file a bug at http://d.puremagic.com/issues .


T

-- 
GEEK = Gatherer of Extremely Enlightening Knowledge


More information about the Digitalmars-d-learn mailing list