summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r--llvm/lib/Support/APFloat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index 097986d3e7c..659914a85f5 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -212,15 +212,15 @@ skipLeadingZeroesAndAnyDot(StringRef::iterator begin, StringRef::iterator end,
{
StringRef::iterator p = begin;
*dot = end;
- while (*p == '0' && p != end)
+ while (p != end && *p == '0')
p++;
- if (*p == '.') {
+ if (p != end && *p == '.') {
*dot = p++;
assert(end - begin != 1 && "Significand has no digits");
- while (*p == '0' && p != end)
+ while (p != end && *p == '0')
p++;
}
OpenPOWER on IntegriCloud