From 66ac3e863f6040568e84a7bb9f0eb44024e1b13b 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. See #17555. (cherry picked from commit 889cbd8e045f622456873a94be5e2f91209614e5) --- 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 b5b33de9f1..3e221e9972 100644 --- a/src/common/translation.cpp +++ b/src/common/translation.cpp @@ -1719,7 +1719,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;