From 5a99f4f2f089cd680c4fc782814f398d516a6a47 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 25 Jan 2008 08:11:23 -0800 Subject: [PATCH] float.c: BR 1879670: fix output byte order The fix for the memory overwrite output the bytes in the wrong order. Fix. --- float.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/float.c b/float.c index fbd95e03..04468ecd 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 */ }