summaryrefslogtreecommitdiff
path: root/float.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-25 08:11:23 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-01-25 08:11:23 -0800
commit5a99f4f2f089cd680c4fc782814f398d516a6a47 (patch)
tree2c4af85e8f5cdfa9844ba9232954ed609d857d35 /float.c
parent2b046cf67fd529aace7026b499a440cd4ba0fa6d (diff)
downloadnasm-5a99f4f2f089cd680c4fc782814f398d516a6a47.tar.gz
nasm-5a99f4f2f089cd680c4fc782814f398d516a6a47.tar.bz2
nasm-5a99f4f2f089cd680c4fc782814f398d516a6a47.zip
float.c: BR 1879670: fix output byte order
The fix for the memory overwrite output the bytes in the wrong order. Fix.
Diffstat (limited to 'float.c')
-rw-r--r--float.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/float.c b/float.c
index fbd95e0..04468ec 100644
--- a/float.c
+++ b/float.c
@@ -805,7 +805,7 @@ static int to_float(const char *str, int s, uint8_t * result,
mant[0] |= minus ? LIMB_TOP_BIT : 0;
for (i = fmt->bytes - 1; i >= 0; i--)
- *result++ = mant[i/LIMB_BYTES] >> ((i%LIMB_BYTES)*8);
+ *result++ = mant[i/LIMB_BYTES] >> (((LIMB_BYTES-1)-(i%LIMB_BYTES))*8);
return 1; /* success */
}