Commit 08602884 authored by Kamal Marhubi's avatar Kamal Marhubi

Use inputExhausted more

parent 6b54e8fe
......@@ -390,7 +390,7 @@ public:
consumeWhitespace();
KJ_DEFER(consumeWhitespace());
KJ_REQUIRE(remaining_.size() > 0, "JSON message ends prematurely.");
KJ_REQUIRE(!inputExhausted(), "JSON message ends prematurely.");
switch (nextChar()) {
case 'n': consume(NULL_); output.setNull(); break;
......@@ -503,7 +503,7 @@ public:
}
char nextChar() {
KJ_REQUIRE(remaining_.size() > 0, "JSON message ends prematurely.");
KJ_REQUIRE(!inputExhausted(), "JSON message ends prematurely.");
return remaining_.front();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment