diff --git a/cursor.h b/cursor.h index 8b126d0..2be7f19 100644 --- a/cursor.h +++ b/cursor.h @@ -568,7 +568,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)