This commit is contained in:
parent
1643d2ee94
commit
19eaaab081
@ -381,13 +381,9 @@ static sxi32 InternFormat(ProcConsumer xConsumer, void *pUserData, const char *z
|
|||||||
precision--;
|
precision--;
|
||||||
}
|
}
|
||||||
rounder = 0.0;
|
rounder = 0.0;
|
||||||
#if 0
|
/* Rounding works like BSD when the constant 0.4999 is used. Wierd!
|
||||||
/* Rounding works like BSD when the constant 0.4999 is used.Wierd! */
|
* It makes more sense to use 0.5 instead. */
|
||||||
for(idx = precision, rounder = 0.4999; idx > 0; idx--, rounder *= 0.1);
|
|
||||||
#else
|
|
||||||
/* It makes more sense to use 0.5 */
|
|
||||||
for(idx = precision, rounder = 0.5; idx > 0; idx--, rounder *= 0.1);
|
for(idx = precision, rounder = 0.5; idx > 0; idx--, rounder *= 0.1);
|
||||||
#endif
|
|
||||||
if(infop->type == SXFMT_FLOAT) {
|
if(infop->type == SXFMT_FLOAT) {
|
||||||
realvalue += rounder;
|
realvalue += rounder;
|
||||||
}
|
}
|
||||||
@ -761,4 +757,4 @@ PH7_PRIVATE sxu32 SyBufferFormat(char *zBuf, sxu32 nLen, const char *zFormat, ..
|
|||||||
sBlob.mByte++;
|
sBlob.mByte++;
|
||||||
SyBlobAppend(&sBlob, "\0", sizeof(char));
|
SyBlobAppend(&sBlob, "\0", sizeof(char));
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user