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:
richard67
2016-06-02 12:15:54 +02:00
committed by Vadim Zeitlin
parent 690ca5a1b4
commit 889cbd8e04

View File

@@ -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;