summaryrefslogtreecommitdiff
path: root/float.c
diff options
context:
space:
mode:
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)