aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2005-07-09 02:38:06 +0000
committerdrh <drh@noemail.net>2005-07-09 02:38:06 +0000
commite866fcb923c3e1b343046e4cdfdfa3b64bbc02d3 (patch)
tree66ac2c11c3644dce58f52ba4a6cf6bf1f9ee9e46 /src
parentdf3816974c03a83e73f0dd5c67cc07f0313f3d03 (diff)
downloadsqlite-e866fcb923c3e1b343046e4cdfdfa3b64bbc02d3.tar.gz
sqlite-e866fcb923c3e1b343046e4cdfdfa3b64bbc02d3.zip
Use the internal sqlite3_snprintf function instead of sprintf to avoid
cross-platform incompatibilities. Ticket #1316. (CVS 2545) FossilOrigin-Name: 431999da7bf0079e0d514483b3bfd9f8471cba7d
Diffstat (limited to 'src')
-rw-r--r--src/func.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/func.c b/src/func.c
index dd2a0cda6..205742a3e 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.101 2005/07/08 13:53:22 drh Exp $
+** $Id: func.c,v 1.102 2005/07/09 02:38:06 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -194,7 +194,7 @@ static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
}
if( SQLITE_NULL==sqlite3_value_type(argv[0]) ) return;
r = sqlite3_value_double(argv[0]);
- sprintf(zBuf,"%.*f",n,r);
+ sqlite3_snprintf(sizeof(zBuf),zBuf,"%.*f",n,r);
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
}