Merge pull request #16896 from xjqbest/develop

fix bug of num > INT_MAX
shanyi15-patch-1
jiaqi 7 years ago committed by GitHub
commit 8bcba3db84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -531,7 +531,7 @@ bool MultiSlotDataFeed::CheckFile(const char* filename) {
char* endptr = const_cast<char*>(str);
int len = line.length();
for (size_t i = 0; i < all_slots_.size(); ++i) {
int num = strtol(endptr, &endptr, 10);
auto num = strtol(endptr, &endptr, 10);
if (num < 0) {
VLOG(0) << "error: the number of ids is a negative number: " << num;
VLOG(0) << "please check line<" << instance_cout << "> in file<"

Loading…
Cancel
Save