damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 0e0c53145faa0e40b9e193947858b5ded2469dae
parent 76aa1d34505fe844bebef72e867bec677d710243
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 29 Nov 2023 11:58:24 -0800

nostrdb/segfault: fix weird crash in ispunct

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mnostrdb/nostrdb.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nostrdb/nostrdb.c b/nostrdb/nostrdb.c @@ -2081,7 +2081,7 @@ static inline int is_punctuation(unsigned int codepoint) { return 0; // Check for ASCII punctuation - if (ispunct(codepoint)) + if (codepoint <= 128 && ispunct(codepoint)) return 1; // Check for Unicode punctuation exceptions (punctuation allowed in hashtags)