-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NODERAWFS bug in fseek/fwrite #6612
Comments
Bypassing the FILE stream layer avoids the problem: this works fine: Edit: I mixed up. This too fails the same way. This also explains why minizip doesn't work through SWI-Prolog's own I/O streams that ultimately do
|
Related issue: #6381 |
Fixed by #6797. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying to figure out why
minizip
which is embedded in SWI-Prolog produces invalid zip files, I found thatfseek()
/fwrite()
do not function properly. Below is a copy from the discussionRun using
The zero block should have been written with data2, but instead, data2 is at the end.
Versions (on Ubuntu 18.04):
P.s. The original code checks all return values. These are fine. I also inserted an ftell() call after the fseek() that confirms the file pointer moved, but it didn't.
The text was updated successfully, but these errors were encountered: