X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18860312a42d941279c3b9b84b32775d8e80fddf..ba8546912daa12cea8076e08f1694a03e520dfe2:/src/common/config.cpp diff --git a/src/common/config.cpp b/src/common/config.cpp index 4cc55702a7..30ca1fa2e7 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -384,7 +384,8 @@ wxString wxExpandEnvVars(const wxString& str) case '\\': // backslash can be used to suppress special meaning of % and $ - if ( n != str.Len() && (str[n + 1] == wxT('%') || str[n + 1] == wxT('$')) ) { + if ( n != str.Len() - 1 && + (str[n + 1] == wxT('%') || str[n + 1] == wxT('$')) ) { strResult += str[++n]; break;