diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-07-06 19:08:28 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-07-06 19:08:28 +0400 |
commit | faf23d1302cd74ad961cf5b1c7311841e9f50b28 (patch) | |
tree | 5d5c1d0d09b7ec15f631de5a67ff18c0101d325b /output | |
parent | 2b416c9def1711e6e2562c82eca70ea81708f4cb (diff) | |
download | nasm-faf23d1302cd74ad961cf5b1c7311841e9f50b28.tar.gz nasm-faf23d1302cd74ad961cf5b1c7311841e9f50b28.tar.bz2 nasm-faf23d1302cd74ad961cf5b1c7311841e9f50b28.zip |
outbin: Simplify reverse address computing
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'output')
-rw-r--r-- | output/outbin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/output/outbin.c b/output/outbin.c index c994713..6a90aa0 100644 --- a/output/outbin.c +++ b/output/outbin.c @@ -545,8 +545,8 @@ static void bin_cleanup(int debuginfo) saa_fread(r->target->contents, r->posn, mydata, r->bytes); p = q = mydata; l = 0; - for (b = 0; b < r->bytes; b++) - l += p[b] << (b * 8); + for (b = r->bytes - 1; b >= 0; b--) + l = (l << 8) + p[b]; s = find_section_by_index(r->secref); if (s) { |