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 authored and wader committed Aug 24, 2024
1 parent 1e5e1d7 commit 6c6e47f
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 6c6e47f

Please sign in to comment.