mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-22 22:13:04 +03:00
Ensure that the replace() SQL function always returns a TEXT value even
when its first argument is numeric and its second argument is an empty string. Fix for the issue reported by [forum:/forumpost/3776b48e71|forum post 3776b48e71]. FossilOrigin-Name: 01868ebcd25fadb2034da234c0636e82d07c5abc902ef66493cadfc988e74d7b
This commit is contained in:
@@ -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]);
|
||||
|
Reference in New Issue
Block a user