aboutsummaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorLloyd Parkes <lloyd@must-have-coffee.gen.nz>2022-10-16 12:50:49 +1300
committerLloyd Parkes <lloyd@must-have-coffee.gen.nz>2022-10-16 12:50:49 +1300
commit7dcc9c664e5d4f5116f9872ea3fab4a84b61fa40 (patch)
tree3741379bee3138709eeaee20a8e0b284d855cbae /libs
parent635aa2a3fcfb4e9c6a9beba3fd5d818631c75c3f (diff)
downloadyosys-7dcc9c664e5d4f5116f9872ea3fab4a84b61fa40.tar.gz
yosys-7dcc9c664e5d4f5116f9872ea3fab4a84b61fa40.tar.bz2
yosys-7dcc9c664e5d4f5116f9872ea3fab4a84b61fa40.zip
And another place we need to lseek() after dup().
Diffstat (limited to 'libs')
-rw-r--r--libs/fst/fstapi.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/fst/fstapi.cc b/libs/fst/fstapi.cc
index f1b726518..da0d959a0 100644
--- a/libs/fst/fstapi.cc
+++ b/libs/fst/fstapi.cc
@@ -3607,6 +3607,7 @@ static int fstReaderRecreateHierFile(struct fstReaderContext *xc)
fflush(xc->f);
#endif
zfd = dup(fileno(xc->f));
+ lseek(zfd, ftell(xc->f), SEEK_SET);
zhandle = gzdopen(zfd, "rb");
if (!zhandle) {
close(zfd);