diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2025-07-18 09:32:16 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2025-07-18 09:32:33 +0200 |
| commit | 69528489cddd27b4d4b9411d00b60cccc175b0e8 (patch) | |
| tree | eeed9d13f99858b3fd5660bc8d57e86bf81088a3 /src/benc.c | |
| parent | a46e9a5cbb8fc233a0ccb47708e7686c2b561ac0 (diff) | |
Add a simple API for lookups
Diffstat (limited to 'src/benc.c')
| -rw-r--r-- | src/benc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -56,7 +56,7 @@ void benc_print(const struct benc_node* stream, size_t stream_len) { switch(cursor->type) { case BNT_INT: indent(depth); - printf("INT %.*s\n", cursor->size, cursor->loc); + printf("INT %.*s\n", (int)cursor->size, cursor->loc); break; case BNT_STRING: indent(depth); @@ -69,7 +69,7 @@ void benc_print(const struct benc_node* stream, size_t stream_len) { } printf("STR "); if(allprint) { - printf("%.*s", cursor->size, cursor->loc); + printf("%.*s", (int)cursor->size, cursor->loc); } else { for (const unsigned char* c = (const unsigned char*)cursor->loc; c < (unsigned char*)(cursor->loc + cursor->size); c++) { printf("\\x%02X", *c); |
