diff options
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/sqlite/ext/icu/icu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/sqlite/ext/icu/icu.c b/third_party/sqlite/ext/icu/icu.c index 57d59a6..8f7f76d 100644 --- a/third_party/sqlite/ext/icu/icu.c +++ b/third_party/sqlite/ext/icu/icu.c @@ -250,12 +250,12 @@ static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){ UErrorCode status = U_ZERO_ERROR; URegularExpression *pExpr; UBool res; - const UChar *zString = sqlite3_value_text16(apArg[1]); + const UChar *zString; /* If the left hand side of the regexp operator is NULL, ** then the result is also NULL. */ - if( !zString ){ + if( nArg<2 || !(zString=sqlite3_value_text16(apArg[1])) ){ return; } |