Skip to content

Commit

Permalink
add mention of --depth in error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
mgree committed Mar 12, 2024
1 parent 3cb989b commit c4e6358
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jv_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ static void push(struct jv_parser* p, jv v) {
static pfunc parse_token(struct jv_parser* p, char ch) {
switch (ch) {
case '[':
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing";
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing (set with --depth)";
if (jv_is_valid(p->next)) return "Expected separator between values";
push(p, jv_array());
break;

case '{':
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing";
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing (set with --depth)";
if (jv_is_valid(p->next)) return "Expected separator between values";
push(p, jv_object());
break;
Expand Down

0 comments on commit c4e6358

Please sign in to comment.