Fixed incorrect stripping of ? character and beyond in stream name containing a + or space character before the ? character.

This commit is contained in:
Thulinma 2015-07-08 22:38:27 +02:00
parent b93841f659
commit 421842bda5

View file

@ -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) {