mirror of https://github.com/YosysHQ/yosys.git
Forcibly set the current seek location of gz files that we are accessing
via dup(fileno());gzdopen() because stdio might have buffered data from the underlying file meaning that the underlying seek position isn't what we think it is.
This commit is contained in:
parent
fcf742837e
commit
635aa2a3fc
|
@ -4272,6 +4272,7 @@ int fstReaderInit(struct fstReaderContext *xc)
|
|||
#endif
|
||||
|
||||
zfd = dup(fileno(xc->f));
|
||||
lseek(zfd, ftell(xc->f), SEEK_SET);
|
||||
zhandle = gzdopen(zfd, "rb");
|
||||
if (zhandle) {
|
||||
for (offpnt = 0; offpnt < uclen; offpnt += FST_GZIO_LEN) {
|
||||
|
|
Loading…
Reference in New Issue