diff options
-rw-r--r-- | src/corelib/text/qstring.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index c09beceefb..d3a84c9149 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -3071,7 +3071,8 @@ QChar *textCopy(const QChar *start, int len) bool pointsIntoRange(const QChar *ptr, const ushort *base, int len) { const QChar *const start = reinterpret_cast<const QChar *>(base); - return start <= ptr && ptr < start + len; + const std::less<const QChar *> less = {}; + return !less(ptr, start) && less(ptr, start + len); } } // end namespace |