1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-05 21:30:27 +00:00

Merge pull request #1514 from ArtSin/fix-formatb-int32_t-arg

Cast arguments to `int32_t` before passing to `janet_formatb` with `%d` format specifier
This commit is contained in:
Calvin Rose 2024-10-25 05:36:08 -07:00 committed by GitHub
commit 5e443cd29d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;