rest-backend: fix wrong usage of sizeof
Instance var m_pluginProviderStorage is a std::string, therefore the
method length() should be used for the string length.
Fixes issue
@@ -398,7 +398,7 @@ std::string ConvertEngine::extractFormatFromProviderList (const std::string & pr
{
if (boost::starts_with (provider, m_pluginProviderStorage + m_pluginProviderDelim))
{
- format = provider.substr (sizeof (m_pluginProviderStorage));
+ format = provider.substr (m_pluginProviderStorage.length () + 1); // + delimiter length
break;
}
}
