Merge pull request #1170 from lioncash/ret

file_util: Correct return value in early exit of ReadFileToString()
merge-requests/60/head
bunnei 2018-08-27 18:18:31 +07:00 committed by GitHub
commit 2562fe4a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

@ -764,7 +764,7 @@ size_t ReadFileToString(bool text_file, const char* filename, std::string& str)
IOFile file(filename, text_file ? "r" : "rb"); IOFile file(filename, text_file ? "r" : "rb");
if (!file.IsOpen()) if (!file.IsOpen())
return false; return 0;
str.resize(static_cast<u32>(file.GetSize())); str.resize(static_cast<u32>(file.GetSize()));
return file.ReadArray(&str[0], str.size()); return file.ReadArray(&str[0], str.size());