mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
fix (and test) for bug #43722
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38213 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e6ed085192
commit
ca81536515
3 changed files with 29 additions and 9 deletions
|
@ -1243,6 +1243,7 @@ GSScanDouble(unichar *buf, unsigned length, double *result)
|
|||
int exponent = 0;
|
||||
BOOL negativeMantissa = NO;
|
||||
BOOL negativeExponent = NO;
|
||||
BOOL extra = NO;
|
||||
unsigned pos = 0;
|
||||
int mantissaLength;
|
||||
int dotPos = -1;
|
||||
|
@ -1301,14 +1302,8 @@ GSScanDouble(unichar *buf, unsigned length, double *result)
|
|||
{
|
||||
/* Mantissa too long ... ignore excess.
|
||||
*/
|
||||
if (19 == mantissaLength && (dotPos < 0 || dotPos >= mantissaLength))
|
||||
{
|
||||
mantissaLength--;
|
||||
}
|
||||
else
|
||||
{
|
||||
mantissaLength = 19;
|
||||
}
|
||||
mantissaLength = 18;
|
||||
extra = YES;
|
||||
}
|
||||
if (dotPos < 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue