summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxtkoba <69125751+xtkoba@users.noreply.github.com>2021-09-29 19:24:44 +0900
committerGitHub <noreply@github.com>2021-09-29 19:24:44 +0900
commit0ef7a9d7d22c9a7779def3f8c7f0166d996a2401 (patch)
tree0870f827f2a5cc50432f55f43fb26ab98e1f1501
parent7429c5ad8df9ea49c85e28de8f018e7f69dfeaf6 (diff)
downloadffi-0ef7a9d7d22c9a7779def3f8c7f0166d996a2401.tar.gz
Keep `LONGDOUBLE_ADJ >= sizeof(long double)`
-rw-r--r--ext/ffi_c/Call.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ffi_c/Call.c b/ext/ffi_c/Call.c
index 86ce3b9..bd6c277 100644
--- a/ext/ffi_c/Call.c
+++ b/ext/ffi_c/Call.c
@@ -71,7 +71,7 @@
#define FLOAT32_ADJ (4)
#define FLOAT64_ADJ (8)
#define ADDRESS_ADJ (sizeof(void *))
-#define LONGDOUBLE_ADJ (ffi_type_longdouble.alignment)
+#define LONGDOUBLE_ADJ (ffi_type_longdouble.alignment > sizeof(long double) ? ffi_type_longdouble.alignment : sizeof(long double))
#endif /* USE_RAW */