Skip to content

Commit

Permalink
Merge pull request #1514 from ArtSin/fix-formatb-int32_t-arg
Browse files Browse the repository at this point in the history
Cast arguments to `int32_t` before passing to `janet_formatb` with `%d` format specifier
  • Loading branch information
bakpakin authored Oct 25, 2024
2 parents 7bf3a9d + ad77bc3 commit 5e443cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static void delim_error(JanetParser *parser, size_t stack_index, char c, const c
janet_buffer_push_u8(buffer, '`');
}
}
janet_formatb(buffer, " opened at line %d, column %d", s->line, s->column);
janet_formatb(buffer, " opened at line %d, column %d", (int32_t) s->line, (int32_t) s->column);
}
parser->error = (const char *) janet_string(buffer->data, buffer->count);
parser->flag |= JANET_PARSER_GENERATED_ERROR;
Expand Down

0 comments on commit 5e443cd

Please sign in to comment.