Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix issue #3
  • Loading branch information
cktan committed Nov 18, 2017
1 parent edc6a13 commit 01ecb88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions toml.c
Expand Up @@ -1140,6 +1140,10 @@ static void parse_select(context_t* ctx)
/* [[x.y.z]] -> create z = [] in x.y */
toml_array_t* arr = create_keyarray_in_table(ctx, ctx->curtab, z,
1 /*skip_if_exist*/);
if (!arr) {
e_syntax_error(ctx, z.lineno, "key exists");
return;
}
if (arr->kind == 0) arr->kind = 't';
if (arr->kind != 't') {
e_syntax_error(ctx, z.lineno, "array mismatch");
Expand Down

0 comments on commit 01ecb88

Please sign in to comment.