Skip to content

Commit

Permalink
Merge branch 'feature/ifstream' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jun 13, 2017
2 parents 5fa5c17 + 88dc7c1 commit fd4a0ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8862,7 +8862,8 @@ class basic_json
// We initially read a lot of characters into the buffer, and we
// may not have processed all of them. Therefore, we need to
// "rewind" the stream after the last processed char.
is.seekg(start_position + static_cast<std::streamoff>(processed_chars));
is.seekg(start_position);
is.ignore(static_cast<std::streamsize>(processed_chars));
// clear stream flags
is.clear();
}
Expand Down
4 changes: 0 additions & 4 deletions test/src/unit-regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ TEST_CASE("regression tests")
"[json.exception.parse_error.101] parse error at 1: syntax error - unexpected end of input");
}

/*
SECTION("second example from #529")
{
std::string str = "{\n\"one\" : 1,\n\"two\" : 2\n}\n{\n\"three\" : 3\n}";
Expand All @@ -735,21 +734,18 @@ TEST_CASE("regression tests")
if (i == 0)
{
CHECK(val == json({{"one", 1}, {"two", 2}}));
CHECK(static_cast<int>(stream.tellg()) == 28);
}

if (i == 1)
{
CHECK(val == json({{"three", 3}}));
CHECK(static_cast<int>(stream.tellg()) == 44);
}

++i;
}

std::remove("test.json");
}
*/
}

SECTION("issue #389 - Integer-overflow (OSS-Fuzz issue 267)")
Expand Down

0 comments on commit fd4a0ec

Please sign in to comment.