Merge pull request #3430 from DavisVaughan/feature/snprintf-only
Swap `sprintf()` for `snprintf()`
This commit is contained in:
commit
9d1ac21392
1 changed files with 5 additions and 1 deletions
|
|
@ -33,7 +33,11 @@
|
|||
if (self->lexer.logger.log || self->dot_graph_file) { \
|
||||
char *buf = self->lexer.debug_buffer; \
|
||||
const char *symbol = symbol_name; \
|
||||
int off = sprintf(buf, "lexed_lookahead sym:"); \
|
||||
int off = snprintf( \
|
||||
buf, \
|
||||
TREE_SITTER_SERIALIZATION_BUFFER_SIZE, \
|
||||
"lexed_lookahead sym:" \
|
||||
); \
|
||||
for ( \
|
||||
int i = 0; \
|
||||
symbol[i] != '\0' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue