diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-07-01 18:24:40 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-20 05:08:08 +0200 |
commit | 9063119268821a5ea5c1fec0156efa72b84752c6 (patch) | |
tree | d2e4a9635f80557b043882957b5cec5dfcaecca0 /src/corelib/io/qurl.cpp | |
parent | 4b3acf5aff76344aab4584b5c54b74d189b19246 (diff) |
Make QIPAddress::parseIp6 return the first bad character
In case of undetermined error, returns end.
Change-Id: Ic5d16bab5fc56ad24f19da25f73f9b844ce11d3f
Reviewed-by: David Faure (KDE) <faure@kde.org>
Diffstat (limited to 'src/corelib/io/qurl.cpp')
-rw-r--r-- | src/corelib/io/qurl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 30320c9cc2..d7729b7cb9 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -1141,7 +1141,8 @@ static const QChar *parseIpFuture(QString &host, const QChar *begin, const QChar static bool parseIp6(QString &host, const QChar *begin, const QChar *end, QUrl::ParsingMode mode) { QIPAddressUtils::IPv6Address address; - if (!QIPAddressUtils::parseIp6(address, begin, end)) { + const QChar *ret = QIPAddressUtils::parseIp6(address, begin, end); + if (ret) { // this struct is kept in automatic storage because it's only 4 bytes const ushort decodeColon[] = { decode(':'), 0 }; |