Skip to content
Snippets Groups Projects
Commit 981c4db4 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

double-copying-bug fixed

Rev: src/modules/sprintf/sprintf.c:1.23
parent a34e702e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment