From 69528489cddd27b4d4b9411d00b60cccc175b0e8 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Fri, 18 Jul 2025 09:32:16 +0200 Subject: Add a simple API for lookups --- src/benc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/benc.c') diff --git a/src/benc.c b/src/benc.c index c2c2782..9842dd9 100644 --- a/src/benc.c +++ b/src/benc.c @@ -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); -- cgit v1.2.3