Fix wxTranslations::GetHeaderValue() to look for correct header
Correct the search to completely match the full header name and not only its beginning by appending ": " to the specified search string. This prevents GetHeaderValue("Language") from returning "eam: wxWidgets team" if there is a "Language-Team" header in the catalog, for example. Closes #17555.
This commit is contained in:
@@ -1721,7 +1721,7 @@ wxString wxTranslations::GetHeaderValue(const wxString& header,
|
||||
if ( !trans || trans->empty() )
|
||||
return wxEmptyString;
|
||||
|
||||
size_t found = trans->find(header);
|
||||
size_t found = trans->find(header + wxS(": "));
|
||||
if ( found == wxString::npos )
|
||||
return wxEmptyString;
|
||||
|
||||
|
Reference in New Issue
Block a user