Skip to content

Commit bcbc0c7

Browse files
committed
use unsigned char in ucs4_character_is_ascii
1 parent e4a019a commit bcbc0c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

asciidtype/asciidtype/src/casts.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ unicode_to_ascii_resolve_descriptors(PyObject *NPY_UNUSED(self),
109109
static int
110110
ucs4_character_is_ascii(char *buffer)
111111
{
112-
int first_char = buffer[0];
112+
unsigned char first_char = buffer[0];
113113

114-
if (first_char < 0 || first_char > 127) {
114+
if (first_char > 127) {
115115
return -1;
116116
}
117117

0 commit comments

Comments
 (0)