Fixed FILEPOS_LEN symbol and macro problems

This commit is contained in:
Landon Curt Noll
2022-11-27 17:05:49 -08:00
parent 25dcd8cb80
commit 827988c553
4 changed files with 8 additions and 6 deletions

2
file.c
View File

@@ -1459,7 +1459,7 @@ z2filepos(ZVALUE zpos)
if (zpos.len >= FILEPOS_BITS/BASEB) {
/* copy the lower FILEPOS_BITS of the ZVALUE */
memset(&tmp, 0, sizeof(tmp)); /* FILEPOS could be non-scalar */
memcpy(&tmp, zpos.v, MIN(sizeof(tmp), FILEPOS_LEN);
memcpy(&tmp, zpos.v, MIN(sizeof(tmp), FILEPOS_LEN));
} else {
/* copy what bits we can into the temp value */
memset(&tmp, 0, sizeof(tmp)); /* FILEPOS could be non-scalar */