From 4a58ef843a557c20cf082ff4d34d1fe65fb24474 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 May 2015 01:35:22 +0200 Subject: [PATCH] Always fall back on wxPLATFORM_UNIX in wxEncodingConverter. We could have ended up using (invalid) wxPLATFORM_CURRENT as an index into an array if neither __WINDOWS__, nor __WXMAC__, nor __WXGTK__ nor __WXMOTIF__ were defined (which would be the case in e.g. wxX11 or wxQt ports). Fix this by always falling back on wxPLATFORM_UNIX. --- src/common/encconv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/encconv.cpp b/src/common/encconv.cpp index d0ce3aef1c..a6c24dffbf 100644 --- a/src/common/encconv.cpp +++ b/src/common/encconv.cpp @@ -438,10 +438,10 @@ wxFontEncodingArray wxEncodingConverter::GetPlatformEquivalents(wxFontEncoding e { #if defined(__WINDOWS__) platform = wxPLATFORM_WINDOWS; -#elif defined(__WXGTK__) || defined(__WXMOTIF__) - platform = wxPLATFORM_UNIX; #elif defined(__WXMAC__) platform = wxPLATFORM_MAC; +#else + platform = wxPLATFORM_UNIX; #endif }