mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 07:50:28 +02:00
Storing a size_t returned from std::string in an int and checking for negative is weird.
This commit is contained in:
1 parent
928150fbf4
commit
725094eaef
1 file changed
+2
-2
@@ -78,8 +78,8 @@ bool DirectoryFileSystem::RenameFile(const std::string &from, const std::string
|
||||
std::string fullTo = to;
|
||||
// TO filename may not include path. Intention is that it uses FROM's path
|
||||
if (to.find("/") != std::string::npos) {
|
||||
int offset = from.find_last_of("/");
|
||||
if (offset >= 0) {
|
||||
size_t offset = from.find_last_of("/");
|
||||
if (offset != std::string::npos) {
|
||||
fullTo = from.substr(0, offset + 1) + to;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user