X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3db5226517a63bcdc983e638f1a312764fe1312f..b16de7461ac6d97b0b04a5ce4e73447925e93416:/src/generic/helpext.cpp?ds=sidebyside diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index 0b498470a0..39c9f93735 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -39,6 +39,10 @@ #include #endif +#ifdef __WINDOWS__ +#include "wx/msw/mslu.h" +#endif + #ifdef __WXMSW__ #include #include "wx/msw/winundef.h" @@ -234,9 +238,7 @@ bool wxExtHelpController::LoadFile(const wxString& ifile) file = ifile; if(! wxIsAbsolutePath(file)) { - wxChar* f = wxGetWorkingDirectory(); - file = f; - delete[] f; // wxGetWorkingDirectory returns new memory + file = wxGetCwd(); #ifdef __WXMAC__ file << ifile; #else @@ -344,7 +346,7 @@ wxExtHelpController::DisplayContents() file << m_MapFile << WXEXTHELP_SEPARATOR << contents; if(file.Contains(wxT('#'))) file = file.BeforeLast(wxT('#')); - if(contents.Length() && wxFileExists(file)) + if(contents.length() && wxFileExists(file)) rc = DisplaySection(CONTENTS_ID); // if not found, open homemade toc: @@ -462,4 +464,3 @@ void wxExtHelpController::OnQuit() #endif // wxUSE_HELP -