Code

t/utils/dbi_test: Fixed indexing into the golden_data array.
authorSebastian Harl <sh@tokkee.org>
Tue, 3 Sep 2013 18:05:52 +0000 (20:05 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 3 Sep 2013 18:05:52 +0000 (20:05 +0200)
t/utils/dbi_test.c

index 1666d6ed7e92af8e0baaa63b29b4ce9f8d0d26bc..e32f005f179146d6b4d3f437dc0a33d9d466386c 100644 (file)
@@ -406,7 +406,7 @@ test_query_callback(sdb_dbi_client_t *c,
                                "column %zu; expected: %i", data[i].type, i,
                                expected_type);
 
-               expected_data = golden_data[current_query->current_row][i];
+               expected_data = golden_data[current_query->current_row - 1][i + 1];
                switch (expected_type) {
                        case SDB_TYPE_INTEGER:
                                fail_unless(data[i].data.integer == expected_data.integer,