diff options
| author | Jinguang Dong <dongjinguang@huawei.com> | 2018-12-21 15:36:24 +0800 |
|---|---|---|
| committer | mydongistiny <jaysonedson@gmail.com> | 2019-03-04 14:09:16 -0800 |
| commit | 30d1046f049df00866a4fc34b08c071da65ad66e (patch) | |
| tree | fb25862cd6a9e3a9e3e4f406e293f799cd8a38da | |
| parent | fe33cb760256fdf005c8d163acfdf9dc10c4e618 (diff) | |
Fix parameter checking logic error in tokenize
Tokenize requires 4 to 6 arguments. If this condition is not met,
the program will return. But the judgment logic is always false.
It should to change the '||' to '&&' operation.
Bug: none
Test: sqlite unit tests
Change-Id: Id4238ee2ac0b8f3fde1eedaa09d5340b5937fde1
Signed-off-by: Jizhong Wang <wangjizhong@huawei.com>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
| -rw-r--r-- | android/sqlite3_android.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/sqlite3_android.cpp b/android/sqlite3_android.cpp index 659ee6c..9a8db55 100644 --- a/android/sqlite3_android.cpp +++ b/android/sqlite3_android.cpp @@ -267,7 +267,7 @@ static void tokenize(sqlite3_context * context, int argc, sqlite3_value ** argv) int useTokenIndex = 0; int useDataTag = 0; - if (!(argc >= 4 || argc <= 6)) { + if (!(argc >= 4 && argc <= 6)) { ALOGE("Tokenize requires 4 to 6 arguments"); sqlite3_result_null(context); return; |
