mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-27 14:33:00 +00:00
Merge pull request #1170 from lioncash/ret
file_util: Correct return value in early exit of ReadFileToString()
This commit is contained in:
commit
2562fe4a16
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue