mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
Handle zero correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44613 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d120ffd26f
commit
a89e45f754
@ -231,8 +231,8 @@ namespace {
|
|||||||
is taken to have the decimal point after a single leading
|
is taken to have the decimal point after a single leading
|
||||||
non-zero digit.
|
non-zero digit.
|
||||||
|
|
||||||
If the value is zero, V->firstSigDigit points to a zero, and the
|
If the value is zero, V->firstSigDigit points to a non-digit, and
|
||||||
return exponent is zero.
|
the return exponent is zero.
|
||||||
*/
|
*/
|
||||||
struct decimalInfo {
|
struct decimalInfo {
|
||||||
const char *firstSigDigit;
|
const char *firstSigDigit;
|
||||||
@ -263,7 +263,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If number is all zerooes accept any exponent. */
|
/* If number is all zerooes accept any exponent. */
|
||||||
if (p != D->firstSigDigit) {
|
if (decDigitValue(*p) >= 10U) {
|
||||||
if (*p == 'e' || *p == 'E')
|
if (*p == 'e' || *p == 'E')
|
||||||
D->exponent = readExponent(p + 1);
|
D->exponent = readExponent(p + 1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user