Skip to content

Commit f663b2c

Browse files
authored
GH-131296: Avoid invalid signed char comparison in getpath.c assertion (GH-131594)
1 parent 79f7c67 commit f663b2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/getpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ env_to_dict(PyObject *dict, const char *key, int and_clear)
690690
// Quick convert to wchar_t, since we know key is ASCII
691691
wchar_t *wp = wkey;
692692
for (const char *p = &key[4]; *p; ++p) {
693-
assert(*p < 128);
693+
assert(!(*p & 0x80));
694694
*wp++ = *p;
695695
}
696696
*wp = L'\0';

0 commit comments

Comments
 (0)