diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2007-12-05 13:01:24 +0000 |
---|---|---|
committer | Neil Booth <neil@daikokuya.co.uk> | 2007-12-05 13:01:24 +0000 |
commit | 3ab004bca6c70b2a3861e7c67d715a9e82e1a3b2 (patch) | |
tree | e0aefcb1ebabf29bfec082eb325cc6bae48baf29 /llvm/lib/Support/APFloat.cpp | |
parent | 678b86d6cec6dbc2f7c4d8b29fd788fb7db57e2d (diff) | |
download | bcm5719-llvm-3ab004bca6c70b2a3861e7c67d715a9e82e1a3b2.tar.gz bcm5719-llvm-3ab004bca6c70b2a3861e7c67d715a9e82e1a3b2.zip |
Handle zero correctly.
llvm-svn: 44613
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index d713223a1e1..f0707fc442e 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -231,8 +231,8 @@ namespace { is taken to have the decimal point after a single leading non-zero digit. - If the value is zero, V->firstSigDigit points to a zero, and the - return exponent is zero. + If the value is zero, V->firstSigDigit points to a non-digit, and + the return exponent is zero. */ struct decimalInfo { const char *firstSigDigit; @@ -263,7 +263,7 @@ namespace { } /* If number is all zerooes accept any exponent. */ - if (p != D->firstSigDigit) { + if (decDigitValue(*p) >= 10U) { if (*p == 'e' || *p == 'E') D->exponent = readExponent(p + 1); |