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

bugfix for HP-UX

Rev: src/modules/sprintf/sprintf.c:1.62
parent c2d19fc7
No related branches found
No related tags found
No related merge requests found
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
*/ */
#include "global.h" #include "global.h"
RCSID("$Id: sprintf.c,v 1.61 2000/03/29 05:17:44 hubbe Exp $"); RCSID("$Id: sprintf.c,v 1.62 2000/03/29 22:15:46 hubbe Exp $");
#include "error.h" #include "error.h"
#include "array.h" #include "array.h"
#include "svalue.h" #include "svalue.h"
...@@ -1196,7 +1196,9 @@ static void low_pike_sprintf(struct format_stack *fs, ...@@ -1196,7 +1196,9 @@ static void low_pike_sprintf(struct format_stack *fs,
if(fs->fsp->precision<0) { if(fs->fsp->precision<0) {
double m=pow(10.0, (double)fs->fsp->precision); double m=pow(10.0, (double)fs->fsp->precision);
tf=RINT(tf*m)/m; tf=RINT(tf*m)/m;
} } else if (fs->fsp->precision==0) {
tf=RINT(tf);
}
sprintf(x,buffer,1,fs->fsp->precision<0?0:fs->fsp->precision,tf); sprintf(x,buffer,1,fs->fsp->precision<0?0:fs->fsp->precision,tf);
fs->fsp->len=strlen(x); fs->fsp->len=strlen(x);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment