git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11673
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// check the boundary condition below
// this is more efficient than strrchr()
+ dst--;
while ( *dst != wxCONFIG_PATH_SEPARATOR )
{
dst--;
posLastSlash = -1;
}
- // this shouldn't happen
+ // we must have found a slash one way or another!
wxASSERT_MSG( *dst == wxCONFIG_PATH_SEPARATOR,
_T("error in wxRegConfig::SetPath") );
+ // stay at the same position
+ dst--;
+
// we killed one
totalSlashes--;
}