Prior commit updated wrong if, apologies.
authorNeil Booth <neil@daikokuya.co.uk>
Wed, 5 Dec 2007 13:06:04 +0000 (13:06 +0000)
committerNeil Booth <neil@daikokuya.co.uk>
Wed, 5 Dec 2007 13:06:04 +0000 (13:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44614 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APFloat.cpp

index f0707fc442e43efdbbbcea0dc98d7147db142e6c..5d2146d0747a832cbd1d1e0963d2bc7ebfebd0f7 100644 (file)
@@ -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