From 4cfe28d802bc7c592dfb17f2ccaa5c1579127ecd Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 28 Dec 2023 14:46:17 -0800 Subject: [PATCH] nostrdb/bech32: fix big in bech32 size parsing Signed-off-by: William Casarin --- nostrdb/src/content_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostrdb/src/content_parser.c b/nostrdb/src/content_parser.c index 758926c9..c4898df8 100644 --- a/nostrdb/src/content_parser.c +++ b/nostrdb/src/content_parser.c @@ -495,7 +495,7 @@ static int parse_mention_bech32(struct cursor *cur, struct ndb_block *block) { return 0; } - block->block.str.len = cur->p - start; + block->block.str.len = cur->p - (unsigned char*)block->block.str.str; block->type = BLOCK_MENTION_BECH32; return 1;