commit fefb9df7cd51e3233401aad9c9508f302e903297
parent dba2412f766da329063a773fc4a31f2f40b8b67d
Author: William Casarin <jb55@jb55.com>
Date: Wed, 29 Nov 2023 11:58:24 -0800
segfault: fix weird crash in ispunct
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nostrdb.c b/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)