*** libs/filesystem/src/path_posix_windows.cpp Sun Aug 4 15:47:35 2002 --- ../boost_1_28_0/libs/filesystem/src/path_posix_windows.cpp Sat Aug 17 16:24:40 2002 *************** *** 365,371 **** { assert( pos < path_ptr->m_path.size() ); // detect increment past end pos += name.size(); ! if ( path_ptr->m_path[pos] == '/' ) ++pos; std::string::size_type end_pos( path_ptr->m_path.find( '/', pos ) ); if ( end_pos == std::string::npos ) end_pos = path_ptr->m_path.size(); name = path_ptr->m_path.substr( pos, end_pos - pos ); --- 365,380 ---- { assert( pos < path_ptr->m_path.size() ); // detect increment past end pos += name.size(); ! assert(pos <= path_ptr->m_path.size()); ! if ( pos == path_ptr->m_path.size() ) ! { ! name = ""; ! return; ! } ! else if ( path_ptr->m_path[pos] == '/') ! { ! ++pos; ! } std::string::size_type end_pos( path_ptr->m_path.find( '/', pos ) ); if ( end_pos == std::string::npos ) end_pos = path_ptr->m_path.size(); name = path_ptr->m_path.substr( pos, end_pos - pos );