Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
June 18, 2006 [Issue 207] New: isUniAlpha fails for values < 'A' | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=207 Summary: isUniAlpha fails for values < 'A' Product: D Version: 0.160 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: bugzilla@digitalmars.com ReportedBy: lio@lunesu.com import std.uni; void main() { isUniAlpha(' ');//crash } Reason: isUniAlpha uses a binary search, with end condition "while (low<=high)", low and high being uints. At some point the only table entry to test is [0], low and high are both 0, mid will be 0 and since entry [0] is still not OK, high=mid-1 => ~0. Fix: make low,high,end "int". dmd\src\phobos\std\uni.c, line 461-463 int mid; int low; int high; (The fix was tested and works) -- |
June 18, 2006 Re: [Issue 207] New: isUniAlpha fails for values < 'A' | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | (it includes the fix, by the way) |
June 18, 2006 [Issue 207] isUniAlpha crashes for values < 'A' | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=207 benoit@tionex.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #1 from benoit@tionex.de 2006-06-18 13:53 ------- *** This bug has been marked as a duplicate of 202 *** -- |
Copyright © 1999-2021 by the D Language Foundation