You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
No idea why, but the function call returns 0 (which is correct), yet future writes continue from the old location not the new one. I had to change fseek to:
returnfseek((FILE*)params[1],params[2],whence);
And flength to:
intfn=fileno((FILE*)params[1]);
c=lseek(fn,0,SEEK_CUR); /* save the current position */l=lseek(fn,0,SEEK_END); /* return the file position at its end */fseek((FILE*)params[1],c,SEEK_SET); /* restore the file pointer */
The latter uses a mix of lseek and fseek because all of one or the other failed in different ways.