From c74b7ee204853413813d06e4ae008639b4f12118 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 24 Aug 2018 02:20:00 -0400 Subject: 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. --- src/common/file_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index b30a67ff9..baa721481 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp @@ -764,7 +764,7 @@ size_t ReadFileToString(bool text_file, const char* filename, std::string& str) IOFile file(filename, text_file ? "r" : "rb"); if (!file.IsOpen()) - return false; + return 0; str.resize(static_cast(file.GetSize())); return file.ReadArray(&str[0], str.size()); -- cgit v1.2.3