aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2007-12-05 13:01:24 +0000
committerNeil Booth <neil@daikokuya.co.uk>2007-12-05 13:01:24 +0000
commitf7d116e05c7657f5d4f8fd7b2570c18099a11e59 (patch)
treed1ee58c745b9b5be3678ad0a29cbf505825d4c41 /lib/Support
parentd973104b912db9dc854d22e4be75c62f8343005a (diff)
downloadexternal_llvm-f7d116e05c7657f5d4f8fd7b2570c18099a11e59.zip
external_llvm-f7d116e05c7657f5d4f8fd7b2570c18099a11e59.tar.gz
external_llvm-f7d116e05c7657f5d4f8fd7b2570c18099a11e59.tar.bz2
Handle zero correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/APFloat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index d713223..f0707fc 100644
--- a/lib/Support/APFloat.cpp
+++ b/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);