Open CoSoCo opened 2 years ago
This bug lead to a complicated question here: https://stackoverflow.com/questions/73210048/how-can-a-function-change-the-original-variable-when-it-is-passed-as-value-argu/73266886#73266886
It appears, that the value retrieved from dlp_exec (sd, req, &res)
in dlp.c
is only 32 bit, so we can use unsigned int
for diriterator
.
Because emum dlpVFSFileIteratorConstants
are of type int
, user should use casts like:
unsigned itr = (unsigned)vfsIteratorStart;
while ((emum dlpVFSFileIteratorConstants)itr != vfsIteratorStop) {
PI_ERR result = dlp_VFSDirEntryEnumerate(sd, dirRef, &itr, &maxItems, &dirItems)
[.....]
So here is a patch to solve the problem: 0003-Fix-type-mismatch-of-iterator-in-dlp_VFSDirEntryEnum.patch.zip
I already reported this problem erroneously on the JPilot project.
Please see https://github.com/juddmon/jpilot/issues/39 for the details.