From 421842bda5f2229f1caa21ce421f75f499552e85 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 8 Jul 2015 22:38:27 +0200 Subject: [PATCH] Fixed incorrect stripping of ? character and beyond in stream name containing a + or space character before the ? character. --- lib/stream.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/stream.cpp b/lib/stream.cpp index cb1f6242..7c8551c3 100644 --- a/lib/stream.cpp +++ b/lib/stream.cpp @@ -53,7 +53,11 @@ void Util::sanitizeName(std::string & streamname) { if(index != std::string::npos){ std::string preplus = streamname.substr(0,index); sanitizeName(preplus); - streamname = preplus+"+"+streamname.substr(index+1); + std::string postplus = streamname.substr(index+1); + if (postplus.find('?') != std::string::npos){ + postplus = postplus.substr(0, (postplus.find('?'))); + } + streamname = preplus+"+"+postplus; return; } for (std::string::iterator i = streamname.end() - 1; i >= streamname.begin(); --i) {