summaryrefslogtreecommitdiff
path: root/float.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 20:58:55 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 20:58:55 +0000
commit335b6536eb415452a0086131bec396380d7c99f7 (patch)
tree9664d8f4cc62b79ccfb819c2c3a4860ac2158bb9 /float.c
parent41bf8002b2fa402bd344a290fcc9f65de328859c (diff)
downloadnasm-branch-0_98bf.tar.gz
Diffstat (limited to 'float.c')
-rw-r--r--float.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/float.c b/float.c
index 545ae773..a269bcf1 100644
--- a/float.c
+++ b/float.c
@@ -210,7 +210,8 @@ static int round(unsigned short *mant, int i)
return 0;
}
-#define put(a,b) ( (*(a)=(b)), ((a)[1]=(b)>>8) )
+#define put(a,b) ( ((a)[0]=(unsigned char)((b) & 0xFF)), \
+ ((a)[1]=(unsigned char)(((b) >> 8) & 0xFF)) )
static int to_double(char *str, long sign, unsigned char *result,
efunc error)