wrapper_fread currently misbehaves when it reads 0 bytes from a file, disrupting the stream so the next access gives garbage, at least in the cfe case highlighted in #58 . This can be fixed by adding a special 0 bytes are read, as is done by glibc's fread, and Irix's, although Irix's only looks at count, this also complies with the behaviour the C standard specifies.
Fixes #58 , certainly for the two cases mentioned in that issue. I have not attempted to build a whole decomp repository with this (yet, anyway), so that's worth testing.
wrapper_fread
currently misbehaves when it reads 0 bytes from a file, disrupting the stream so the next access gives garbage, at least in the cfe case highlighted in #58 . This can be fixed by adding a special 0 bytes are read, as is done by glibc'sfread
, and Irix's, although Irix's only looks atcount
, this also complies with the behaviour the C standard specifies.Fixes #58 , certainly for the two cases mentioned in that issue. I have not attempted to build a whole decomp repository with this (yet, anyway), so that's worth testing.
EDIT: also added missing
'o'
case to_mprintf
.