Fix signed/unsigned comparison to avoid compilation warning (GH-24441)

This commit is contained in:
Ken Jin 2021-02-05 05:38:18 +08:00 committed by GitHub
parent 497b5649cf
commit 28873a7050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -680,7 +680,7 @@ _Py_COMP_DIAG_POP
assert(size > 0);
len = PyUnicode_AsWideChar(t, P, size);
assert(len >= 0);
assert(len < size);
assert((unsigned)len < size);
size -= (DWORD)len + 1;
P += len + 1;
}