Ensure that LoadSequentialFile() actually read the whole file (#5831)

This commit is contained in:
Philip Hyunsu Cho
2020-07-04 16:17:11 +08:00
committed by GitHub
parent 1a0801238e
commit efe3e48ae2
4 changed files with 17 additions and 35 deletions
+3 -1
View File
@@ -9,12 +9,12 @@
#include <vector>
#include <memory>
#include <string>
#include <cinttypes>
#include <utility>
#include <map>
#include <limits>
#include <sstream>
#include <locale>
#include <cinttypes>
namespace xgboost {
/*
@@ -86,6 +86,8 @@ class JsonReader {
msg += "\", got: \"";
if (got == -1) {
msg += "EOF\"";
} else if (got == 0) {
msg += "\\0\"";
} else {
msg += std::to_string(got) + " \"";
}