From 72e7f9410ac21163217004445d27f742dc478b12 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 9 May 2016 20:05:06 +0300 Subject: [PATCH] Fixed: url inheriting for defined empty query component --- code/nel/src/gui/url_parser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/nel/src/gui/url_parser.cpp b/code/nel/src/gui/url_parser.cpp index 68d4f8496..7369289f2 100644 --- a/code/nel/src/gui/url_parser.cpp +++ b/code/nel/src/gui/url_parser.cpp @@ -78,7 +78,7 @@ namespace NLGUI pos = uri.find("?"); if (pos != npos) { - query = uri.substr(pos + 1); + query = uri.substr(pos); uri = uri.substr(0, pos); } @@ -210,7 +210,9 @@ namespace NLGUI result += path; if (!query.empty()) - result += "?" + query; + if (query.find_first_of("?") != 0) + result += "?"; + result += query; if (!hash.empty()) result += "#" + hash;