summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2004-03-23 20:46:25 +0000
committerJason Wright <jason@cvs.openbsd.org>2004-03-23 20:46:25 +0000
commitf3affb72d6ece52f86159b9a89e09943927179ca (patch)
tree17ecfcd424cbb79082648f641c0ce6df1cf12d30
parent9d785046462a2fd00ec35a554fa9409918a37c14 (diff)
use absolute value like rev 1.1 did; pointed out by tom and ok deraadt.
-rw-r--r--lib/libc/arch/sparc64/fpu/fpu_explode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/arch/sparc64/fpu/fpu_explode.c b/lib/libc/arch/sparc64/fpu/fpu_explode.c
index 19a05500fbb..64247f38e56 100644
--- a/lib/libc/arch/sparc64/fpu/fpu_explode.c
+++ b/lib/libc/arch/sparc64/fpu/fpu_explode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_explode.c,v 1.2 2004/03/23 20:02:18 jason Exp $ */
+/* $OpenBSD: fpu_explode.c,v 1.3 2004/03/23 20:46:24 jason Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -130,6 +130,7 @@ __fpu_xtof(fp, i)
* fpu_norm()'s handling of `supernormals'; see fpu_subr.c.
*/
fp->fp_exp = FP_LG2;
+ i = (i < 0) ? -i : i;
fp->fp_mant[0] = (i >> 32) & 0xffffffff;
fp->fp_mant[1] = (i >> 0) & 0xffffffff;
fp->fp_mant[2] = 0;