Fix naddr crash
This commit is contained in:
1 parent
44a2c4ba7b
commit
cb8585e4f8
1 file changed
+4
@@ -167,11 +167,15 @@ static int parse_mention_bech32(struct cursor *cur, struct block *block) {
|
||||
if (!parse_str(cur, "nostr:"))
|
||||
return 0;
|
||||
|
||||
block->block.str.start = (const char *)cur->p;
|
||||
|
||||
if (!parse_nostr_bech32(cur, &block->block.mention_bech32.bech32)) {
|
||||
cur->p = start;
|
||||
return 0;
|
||||
}
|
||||
|
||||
block->block.str.end = (const char *)cur->p;
|
||||
|
||||
block->type = BLOCK_MENTION_BECH32;
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in new issue
Block a user