summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-22 19:37:36 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-22 19:37:36 -0700
commitf41aef273b05a1ed7e2608f019bd8b5d6e561924 (patch)
treeee7572c4155dde9bf79e099c4a3498525d593b73
parentc65a2f634b8ca75cceeb79a9afbc381a7ae0362f (diff)
downloadnasm-f41aef273b05a1ed7e2608f019bd8b5d6e561924.tar.gz
Decimal floating point can also start with 0. 0e 0E
A floating point number starting with 0. 0e or 0E is still decimal. Make it easier by falling back to the standard decimal conversion routine for anything not recognized as a radix prefix.
-rw-r--r--float.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/float.c b/float.c
index 7e99f96c..ca141999 100644
--- a/float.c
+++ b/float.c
@@ -676,16 +676,9 @@ static int to_float(const char *str, int sign, uint8_t * result,
case 't': case 'T':
ok = ieee_flconvert(str+2, mant, &exponent);
break;
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- case '\0':
- /* Leading zero was just a zero */
- ok = ieee_flconvert(str, mant, &exponent);
- break;
default:
- error(ERR_NONFATAL,
- "floating-point constant: invalid radix `%c'", str[1]);
- ok = false;
+ /* Leading zero was just a zero? */
+ ok = ieee_flconvert(str, mant, &exponent);
break;
}
} else if (str[0] == '$') {