From 981c4db496c297fa63f608cf6450dcbed4b8b8b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Sun, 26 Jul 1998 03:26:50 -0700
Subject: [PATCH] double-copying-bug fixed

Rev: src/modules/sprintf/sprintf.c:1.23
---
 src/modules/sprintf/sprintf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/sprintf/sprintf.c b/src/modules/sprintf/sprintf.c
index 9669cc3e52..702a39e61f 100644
--- a/src/modules/sprintf/sprintf.c
+++ b/src/modules/sprintf/sprintf.c
@@ -96,7 +96,7 @@
 */
 
 #include "global.h"
-RCSID("$Id: sprintf.c,v 1.22 1998/07/17 22:31:10 hubbe Exp $");
+RCSID("$Id: sprintf.c,v 1.23 1998/07/26 10:26:50 hubbe Exp $");
 #include "error.h"
 #include "array.h"
 #include "svalue.h"
@@ -944,7 +944,7 @@ static string low_pike_sprintf(char *format,
 	switch(l) {
 	case 4:
 #ifdef FLOAT_IS_IEEE_BIG
-	  *((float*)fsp->b) = tf;
+	  MEMCPY(fsp->b, &tf, 4);
 #else
 #ifdef FLOAT_IS_IEEE_LITTLE
 	  fsp->b[0] = ((char *)&tf)[3];
@@ -958,7 +958,7 @@ static string low_pike_sprintf(char *format,
 	  break;
 	case 8:
 #ifdef DOUBLE_IS_IEEE_BIG
-	  *((double*)fsp->b) = (double)tf;
+	  MEMCPY(fsp->b, &tf, 8);
 #else
 #ifdef DOUBLE_IS_IEEE_LITTLE
 	  td = (double)tf;
-- 
GitLab