Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20f11fe

Browse files
committed
Fix compilation warning in _ctypes module on Window
1 parent c913989 commit 20f11fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Modules/_ctypes/libffi_msvc

Modules/_ctypes/libffi_msvc/ffi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
110110
argp += z;
111111
}
112112

113-
if (argp - stack > ecif->cif->bytes)
113+
if (argp >= stack && (unsigned)(argp - stack) > ecif->cif->bytes)
114114
{
115115
Py_FatalError("FFI BUG: not enough stack space for arguments");
116116
}

0 commit comments

Comments
 (0)