From 889cbd8e045f622456873a94be5e2f91209614e5 Mon Sep 17 00:00:00 2001 From: richard67 Date: Thu, 2 Jun 2016 12:15:54 +0200 Subject: [PATCH] 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. --- src/common/translation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/translation.cpp b/src/common/translation.cpp index bc0717fa73..f82c08f4fa 100644 --- a/src/common/translation.cpp +++ b/src/common/translation.cpp @@ -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;