Parser: Fix segfault in command extraction

This commit is contained in:
Albert S. 2018-11-05 10:46:06 +01:00
rodič 89c662385d
revize f349c7dc00
1 změnil soubory, kde provedl 5 přidání a 1 odebrání

Zobrazit soubor

@ -72,7 +72,11 @@ std::string Parser::extractCommand(std::string cmdname, std::string content) con
if(std::regex_match(content, match, reg))
{
return match.str(2);
if(match.size() > 1)
{
return match.str(2);
}
}
return "";
}