forked from ShuriZma/suyu
1
0
Fork 0

file_util: Correct return value in early exit of ReadFileToString()

While still essentially being zero, we should be returning a numeric
value here, not a boolean typed value.
This commit is contained in:
Lioncash 2018-08-24 02:20:00 -04:00
parent 165c23c848
commit c74b7ee204
1 changed files with 1 additions and 1 deletions

View File

@ -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());