aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-20 17:12:33 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-20 17:12:33 +0000
commitcdd93d8c35e1e983fd3a37f3de2ebc154731f20d (patch)
tree3731cd7adb2b864168cb84563956fbef197f9423 /lib/Support/APFloat.cpp
parent5078f84c82814e4d33846f9ef54281619d362f8a (diff)
Fix two APFloat bugs in converting hexadecimal constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APFloat.cpp')
-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 d15a21b4ff..c13231d3fe 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -2153,7 +2153,7 @@ APFloat::convertFromHexadecimalString(const StringRef &s,
integerPart hex_value;
if(*p == '.') {
- assert(dot == 0);
+ assert(dot == s.end());
dot = p++;
}
@@ -2190,7 +2190,7 @@ APFloat::convertFromHexadecimalString(const StringRef &s,
int expAdjustment;
/* Implicit hexadecimal point? */
- if(!dot)
+ if (dot == s.end())
dot = p;
/* Calculate the exponent adjustment implicit in the number of