Skip to content

Commit e5e7b26

Browse files
Update stgdict.c
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 18d8d93 commit e5e7b26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ctypes/stgdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ PyCStructUnionType_update_stginfo(PyObject *type, PyObject *fields, int isStruct
383383
size = 0;
384384
align = 0;
385385
union_size = 0;
386-
total_align = forced_alignment != 0 ? forced_alignment : 1;
386+
total_align = forced_alignment == 0 ? 1 : forced_alignment;
387387
stginfo->ffi_type_pointer.type = FFI_TYPE_STRUCT;
388388
stginfo->ffi_type_pointer.elements = PyMem_New(ffi_type *, len + 1);
389389
if (stginfo->ffi_type_pointer.elements == NULL) {

0 commit comments

Comments
 (0)