aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2006-06-13 19:26:10 +0000
committerdrh <drh@noemail.net>2006-06-13 19:26:10 +0000
commit88897a72e98ede8c4a90e0dede1ad3cf476ec470 (patch)
tree28b8b761ba7c28821abe00bdd61d7ec7ecdb4556 /src
parent7f3759015a1f56fa22b8cf6105ac8793fc2363f1 (diff)
downloadsqlite-88897a72e98ede8c4a90e0dede1ad3cf476ec470.tar.gz
sqlite-88897a72e98ede8c4a90e0dede1ad3cf476ec470.zip
The (unsupported) soundex() function returns '?000' when given a NULL.
Ticket #1845. (CVS 3233) FossilOrigin-Name: 9372481f233e1563b5ee137535f0fbf19851ffad
Diffstat (limited to 'src')
-rw-r--r--src/func.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/func.c b/src/func.c
index 2affd8480..9d62e54f3 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.129 2006/06/13 17:39:00 drh Exp $
+** $Id: func.c,v 1.130 2006/06/13 19:26:11 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -655,6 +655,7 @@ static void soundexFunc(sqlite3_context *context, int argc, sqlite3_value **argv
};
assert( argc==1 );
zIn = (u8*)sqlite3_value_text(argv[0]);
+ if( zIn==0 ) zIn = "";
for(i=0; zIn[i] && !isalpha(zIn[i]); i++){}
if( zIn[i] ){
zResult[0] = toupper(zIn[i]);