nostrdb/segfault: fix weird crash in ispunct
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user