Use the correct function number when updating the function def.

Functions are 1 based in progs bug 0 based in qfo files.
This commit is contained in:
Bill Currie 2011-03-05 16:00:39 +09:00
parent 535dfad305
commit fcb567fc98

View file

@ -732,7 +732,7 @@ qfo_relocate_refs (qfo_t *qfo)
QFO_INT (qfo, reloc->space, reloc->offset) = def->offset;
break;
case rel_def_func:
QFO_INT (qfo, reloc->space, reloc->offset) = reloc->target;
QFO_INT (qfo, reloc->space, reloc->offset) = reloc->target + 1;
break;
case rel_def_string:
QFO_INT (qfo, reloc->space, reloc->offset) = reloc->target;