summaryrefslogtreecommitdiffstats
path: root/src/func.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:38 +0000
commit8cb0288fa14ba73d0f6eea982bb7d30414460bfb (patch)
tree0ea6af723f53807b69ff4060b07381b45def1c15 /src/func.c
parentAdding debian version 3.45.1-1. (diff)
downloadsqlite3-8cb0288fa14ba73d0f6eea982bb7d30414460bfb.tar.xz
sqlite3-8cb0288fa14ba73d0f6eea982bb7d30414460bfb.zip
Merging upstream version 3.45.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/func.c b/src/func.c
index 58ef4fe..9fbd1e9 100644
--- a/src/func.c
+++ b/src/func.c
@@ -1101,13 +1101,13 @@ void sqlite3QuoteValue(StrAccum *pStr, sqlite3_value *pValue){
double r1, r2;
const char *zVal;
r1 = sqlite3_value_double(pValue);
- sqlite3_str_appendf(pStr, "%!.15g", r1);
+ sqlite3_str_appendf(pStr, "%!0.15g", r1);
zVal = sqlite3_str_value(pStr);
if( zVal ){
sqlite3AtoF(zVal, &r2, pStr->nChar, SQLITE_UTF8);
if( r1!=r2 ){
sqlite3_str_reset(pStr);
- sqlite3_str_appendf(pStr, "%!.20e", r1);
+ sqlite3_str_appendf(pStr, "%!0.20e", r1);
}
}
break;
@@ -1409,7 +1409,7 @@ static void replaceFunc(
}
if( zPattern[0]==0 ){
assert( sqlite3_value_type(argv[1])!=SQLITE_NULL );
- sqlite3_result_value(context, argv[0]);
+ sqlite3_result_text(context, (const char*)zStr, nStr, SQLITE_TRANSIENT);
return;
}
nPattern = sqlite3_value_bytes(argv[1]);