소스 검색

Off-by-one change in std::string::rfind

Michael Ragazzon 6 년 전
부모
커밋
603fd40568
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Source/Core/URL.cpp

+ 1 - 1
Source/Core/URL.cpp

@@ -225,7 +225,7 @@ bool URL::SetURL(const String& _url)
 		{
 			// If we found a /.. we should be able to find the start of the parent
 			// directory, if we can't something wierd has happend, bail
-			size_t parent_dir_start_pos = path.rfind("/", parent_dir_pos);
+			size_t parent_dir_start_pos = path.rfind("/", parent_dir_pos - 1);
 			if (parent_dir_start_pos == String::npos)
 				break;