remove wrong snprintf

This commit is contained in:
silverweed 2024-08-21 14:05:44 +02:00
parent 7f300d0ded
commit b5561b86ca

View file

@ -138,7 +138,7 @@ String8 render_range_bytes_to_string(Arena *arena, App_State &app, Term_Viewer &
*cur++ = '\n';
// first line addr
cur += snprintf(cur, max_addr_len, line_addr_fmt.c(), start);
cur += sprintf(cur, line_addr_fmt.c(), start);
for (u32 i = 0; i < n_spaces_after_line_addr; ++i)
*cur++ = ' ';
@ -154,14 +154,14 @@ String8 render_range_bytes_to_string(Arena *arena, App_State &app, Term_Viewer &
cur += acol_str.size;
/// Write the human-readable byte
cur += snprintf(cur, 3, "%02X ", data[off]);
cur += sprintf(cur, "%02X ", data[off]);
// new line
if ((i + 1) % n_cols == 0) {
*cur++ = '\n';
memcpy(cur, col_none.c(), col_none.size);
cur += col_none.size;
cur += snprintf(cur, max_addr_len, line_addr_fmt.c(), off + 1);
cur += sprintf(cur, line_addr_fmt.c(), off + 1);
for (u32 i = 0; i < n_spaces_after_line_addr; ++i)
*cur++ = ' ';
}