strtomp: update the returned char* even if there were no characters parsed
This commit is contained in:
parent
261ec9fe0e
commit
913ce62cfc
1 changed files with 3 additions and 3 deletions
|
@ -240,13 +240,13 @@ strtomp(char *a, char **pp, int base, mpint *b)
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(pp != nil)
|
||||||
|
*pp = e;
|
||||||
|
|
||||||
// if no characters parsed, there wasn't a number to convert
|
// if no characters parsed, there wasn't a number to convert
|
||||||
if(e == a)
|
if(e == a)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
if(pp != nil)
|
|
||||||
*pp = e;
|
|
||||||
|
|
||||||
b->sign = sign;
|
b->sign = sign;
|
||||||
return mpnorm(b);
|
return mpnorm(b);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue