aboutsummaryrefslogtreecommitdiff
path: root/src/libout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libout.c')
-rw-r--r--src/libout.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libout.c b/src/libout.c
index f9ca74f..000b7a9 100644
--- a/src/libout.c
+++ b/src/libout.c
@@ -117,7 +117,7 @@ int LibOutput(const char *filename, const char *filename_bank,
}
-int LibLoad(const char *filename, LibLoadOption opt,
+int LibLoad(const char *filename, LibLoadOption opt, int offset,
char *error, size_t error_size)
{
char magic[CASM_LIBRARY_MAGIC_LEN + 1] = {0};
@@ -163,7 +163,7 @@ int LibLoad(const char *filename, LibLoadOption opt,
fread(buff, 1, len, fp);
- SetPC(min);
+ SetPC((min + offset));
p = buff;
if (opt != LibLoadLabels)
@@ -180,7 +180,7 @@ int LibLoad(const char *filename, LibLoadOption opt,
if (opt != LibLoadMemory)
{
- LabelReadBlob(fp);
+ LabelReadBlob(fp, offset);
}
fclose(fp);