Fix a crash bug.
authorHiroshi Inoue <inoue@tpf.co.jp>
Sun, 14 Sep 2014 00:26:16 +0000 (09:26 +0900)
committerHiroshi Inoue <inoue@tpf.co.jp>
Sun, 14 Sep 2014 00:26:16 +0000 (09:26 +0900)
results.c

index 5d99c8b44246883406f3ee86e8a38c8c8db467c2..83b7c76c5dec54370f88b9598bb2d87fbba1cb7f 100644 (file)
--- a/results.c
+++ b/results.c
@@ -4012,7 +4012,7 @@ pos_add_callback(RETCODE retcode, void *para)
        else
            status |= CURS_SELF_ADDED;
        kres_ridx = GIdx2KResIdx(global_ridx, s->stmt, s->res);
-       if (kres_ridx >= 0 || kres_ridx < s->res->num_cached_keys)
+       if (kres_ridx >= 0 && kres_ridx < s->res->num_cached_keys)
        {
            s->res->keyset[kres_ridx].status = status;
        }