// 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--;
}