mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Fix potential problem with new optimisation for direct access to contents of 8bit strings ... when the decimal separator is not an ascii character we may need to convert the 8bit value to unicode.
This commit is contained in:
parent
3dc437524e
commit
d664bd89e8
1 changed files with 15 additions and 3 deletions
|
@ -901,11 +901,23 @@ typedef GSString *ivars;
|
|||
c = mySevenBit(_scanLocation);
|
||||
if (c < '0' || c > '9')
|
||||
{
|
||||
if (_decimal != c || dotPos >= 0)
|
||||
if (dotPos >= 0)
|
||||
{
|
||||
break; // End of mantissa
|
||||
break; // Already found dot; must be end of mantissa
|
||||
}
|
||||
dotPos = mantissaLength;
|
||||
/* The decimal separator can in theory be outside the ascii range,
|
||||
* and if it is we must fetch the current unicode character in order
|
||||
* to perform the comparison.
|
||||
*/
|
||||
if (_decimal == c
|
||||
|| (_decimal > 127 && _decimal == myCharacter(_scanLocation)))
|
||||
{
|
||||
dotPos = mantissaLength;
|
||||
}
|
||||
else
|
||||
{
|
||||
break; // Not a dot; must be end of mantissa
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue