Avoid the use of atof(). Ticket #1756. (CVS 3168)
FossilOrigin-Name: 76aef93c3e113b0077f534a437a339be2b15ca3d
This commit is contained in:
parent
c65ff65f55
commit
502b962b2d
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Version\s3.3.5\s(CVS\s3167)
|
||||
D 2006-04-05T13:16:49
|
||||
C Avoid\sthe\suse\sof\satof().\s\sTicket\s#1756.\s(CVS\s3168)
|
||||
D 2006-04-07T13:26:43
|
||||
F Makefile.in 5d8dff443383918b700e495de42ec65bc1c8865b
|
||||
F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -43,7 +43,7 @@ F src/date.c cd2bd5d1ebc6fa12d6312f69789ae5b0a2766f2e
|
||||
F src/delete.c 2dea1a83e6ef534346e74fd03114d3a7b16f08fc
|
||||
F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
|
||||
F src/expr.c c85d7bee7d8e3184e00166c2c2ab6edd57b60486
|
||||
F src/func.c 380f2f8e555ccbf899e65f01475c4ac13c478dc2
|
||||
F src/func.c 7dac3a08b99d997591a65c3e730c49169c4d19cb
|
||||
F src/hash.c 449f3d6620193aa557f5d86cbc5cc6b87702b185
|
||||
F src/hash.h 1b3f7e2609141fd571f62199fc38687d262e9564
|
||||
F src/insert.c 1ae4b8ff5549497808e1b57b9243abcb599fd02f
|
||||
@ -355,7 +355,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 119ec402281c142359cfe5ccf1416bf69eed103f
|
||||
R b5f79773e4dd98e06bbd68a24b093253
|
||||
P a091a61d8832ad3454231f480ec605101bb9363a
|
||||
R 8c9f22be40030bbe9c513fbb881bef66
|
||||
U drh
|
||||
Z 4f1fb29ff131aba0fd60e77bc651a999
|
||||
Z 7c78d77240a187b159e2aaf4cfe8a780
|
||||
|
@ -1 +1 @@
|
||||
a091a61d8832ad3454231f480ec605101bb9363a
|
||||
76aef93c3e113b0077f534a437a339be2b15ca3d
|
@ -16,7 +16,7 @@
|
||||
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
|
||||
** All other code has file scope.
|
||||
**
|
||||
** $Id: func.c,v 1.126 2006/03/16 16:19:56 drh Exp $
|
||||
** $Id: func.c,v 1.127 2006/04/07 13:26:43 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@ -204,7 +204,8 @@ static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
|
||||
if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
|
||||
r = sqlite3_value_double(argv[0]);
|
||||
sqlite3_snprintf(sizeof(zBuf),zBuf,"%.*f",n,r);
|
||||
sqlite3_result_double(context, atof(zBuf));
|
||||
sqlite3AtoF(zBuf, &r);
|
||||
sqlite3_result_double(context, r);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user