summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2007-12-05 13:06:04 +0000
committerNeil Booth <neil@daikokuya.co.uk>2007-12-05 13:06:04 +0000
commitcc2335968f3bcc39a12308390ea33ab0eab90744 (patch)
treeae0b40a67eb083c39060c14b633d1b976cb5d532 /lib/Support
parenta89e45f7544bff22b09de7ac7a8c000701bffae4 (diff)
downloadllvm-cc2335968f3bcc39a12308390ea33ab0eab90744.tar.gz
llvm-cc2335968f3bcc39a12308390ea33ab0eab90744.tar.bz2
llvm-cc2335968f3bcc39a12308390ea33ab0eab90744.tar.xz
Prior commit updated wrong if, apologies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/APFloat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index f0707fc442..5d2146d074 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -263,7 +263,7 @@ namespace {
}
/* If number is all zerooes accept any exponent. */
- if (decDigitValue(*p) >= 10U) {
+ if (p != D->firstSigDigit) {
if (*p == 'e' || *p == 'E')
D->exponent = readExponent(p + 1);
@@ -2145,7 +2145,7 @@ APFloat::convertFromDecimalString(const char *p, roundingMode rounding_mode)
42039/12655 < L < 28738/8651 [ numerator <= 65536 ]
*/
- if (*D.firstSigDigit == 0) {
+ if (decDigitValue(*D.firstSigDigit) >= 10U) {
category = fcZero;
fs = opOK;
} else if ((D.normalizedExponent + 1) * 28738