fixed yet another bug in wxRegConfig::SetPath() - SetPath(../..) didn't work

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-09-22 23:23:04 +00:00
parent 5b60dec5c1
commit 79c3b7b216

View File

@@ -274,6 +274,7 @@ void wxRegConfig::SetPath(const wxString& strPath)
// check the boundary condition below // check the boundary condition below
// this is more efficient than strrchr() // this is more efficient than strrchr()
dst--;
while ( *dst != wxCONFIG_PATH_SEPARATOR ) while ( *dst != wxCONFIG_PATH_SEPARATOR )
{ {
dst--; dst--;
@@ -288,10 +289,13 @@ void wxRegConfig::SetPath(const wxString& strPath)
posLastSlash = -1; posLastSlash = -1;
} }
// this shouldn't happen // we must have found a slash one way or another!
wxASSERT_MSG( *dst == wxCONFIG_PATH_SEPARATOR, wxASSERT_MSG( *dst == wxCONFIG_PATH_SEPARATOR,
_T("error in wxRegConfig::SetPath") ); _T("error in wxRegConfig::SetPath") );
// stay at the same position
dst--;
// we killed one // we killed one
totalSlashes--; totalSlashes--;
} }