mirror of
git://jb55.com/damus
synced 2024-09-18 19:23:49 +00:00
Fix naddr crash
This commit is contained in:
parent
44a2c4ba7b
commit
cb8585e4f8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user