From 7af64b07820915f6f35bac1342d375edf0dee70a Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 18 Jul 2020 05:02:34 +0200 Subject: [PATCH] Fix QRegularExpressionMatch in FMPSParser --- ext/libstrawberry-tagreader/fmpsparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/libstrawberry-tagreader/fmpsparser.cpp b/ext/libstrawberry-tagreader/fmpsparser.cpp index 0c1de1d39..0ac0f52a3 100644 --- a/ext/libstrawberry-tagreader/fmpsparser.cpp +++ b/ext/libstrawberry-tagreader/fmpsparser.cpp @@ -92,14 +92,14 @@ bool FMPSParser::Parse(const QString &data) { int FMPSParser::ParseValueRef(const QStringRef& data, QVariant* ret) const { // Try to match a float QRegularExpressionMatch re_match = float_re_.match(*data.string(), data.position()); - if (re_match.captured() == data.position()) { + if (re_match.capturedStart() == data.position()) { *ret = re_match.captured(1).toDouble(); return re_match.capturedLength(); } // Otherwise try to match a string re_match = string_re_.match(*data.string(), data.position()); - if (re_match.captured() == data.position()) { + if (re_match.capturedStart() == data.position()) { // Replace escape sequences with their actual characters QString value = re_match.captured(1); value.replace(escape_re_, "\\1");