diff options
author | H. Peter Anvin <hpa@zytor.com> | 2003-07-16 19:53:51 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2003-07-16 19:53:51 +0000 |
commit | 3198beee7dc341f8f830878cdf74994b2e2169bd (patch) | |
tree | e841e8dd158e453fe660057d45b5c0c091bda2f8 /assemble.c | |
parent | a3cacd74f50263f9563afcfe41f1685b584cc007 (diff) | |
download | nasm-3198beee7dc341f8f830878cdf74994b2e2169bd.tar.gz nasm-3198beee7dc341f8f830878cdf74994b2e2169bd.tar.bz2 nasm-3198beee7dc341f8f830878cdf74994b2e2169bd.zip |
Fix offset computation in the presence of explicit prefixes.
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -356,7 +356,6 @@ long assemble (long segment, long offset, int bits, unsigned long cp, if (insn_size < 0) /* shouldn't be, on pass two */ error (ERR_PANIC, "errors made it through from pass one"); else while (itimes--) { - insn_end = offset + insn_size; for (j=0; j<instruction->nprefix; j++) { unsigned char c=0; switch (instruction->prefixes[j]) { @@ -402,6 +401,7 @@ long assemble (long segment, long offset, int bits, unsigned long cp, offset++; } } + insn_end = offset + insn_size; gencode (segment, offset, bits, instruction, codes, insn_end); offset += insn_size; if (itimes > 0 && itimes == instruction->times-1) { |