aboutsummaryrefslogtreecommitdiff
path: root/src/start.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2024-05-22 14:04:36 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2024-06-12 13:38:05 +0200
commit4f9a2c7a2d8464b04cc08075a7762c6d457090df (patch)
treeae8fe229a3a5ba60d08b74299d0c1850685bda86 /src/start.c
parentf25b015e5b668028c34974bbb22faa4105c26690 (diff)
downloadnanowasm-sync-4f9a2c7a2d8464b04cc08075a7762c6d457090df.tar.gz
WIP
Diffstat (limited to 'src/start.c')
-rw-r--r--src/start.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/start.c b/src/start.c
index c22bddf..e8bc730 100644
--- a/src/start.c
+++ b/src/start.c
@@ -56,7 +56,12 @@ int nw_start(const struct nw_inst_cfg *const icfg, struct nw_inst *const i)
LOG("%s: section_type_push failed\n", __func__);
goto end;
}
- else if (section_code_push(f, fn.start, &fr))
+ else if (fseek(f, fn.start, SEEK_SET))
+ {
+ LOG("%s: fseek(3): %s\n", __func__, strerror(errno));
+ return -1;
+ }
+ else if (section_code_push(f, &fr))
{
LOG("%s: section_code_push failed\n", __func__);
goto end;