diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-20 17:12:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-20 17:12:33 +0000 |
commit | cdd93d8c35e1e983fd3a37f3de2ebc154731f20d (patch) | |
tree | 3731cd7adb2b864168cb84563956fbef197f9423 /lib/Support/APFloat.cpp | |
parent | 5078f84c82814e4d33846f9ef54281619d362f8a (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.cpp | 4 |
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 |