Skip to content

Commit 21535c0

Browse files
committed
increase talbes_count only if needed
1 parent 4fe9be3 commit 21535c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cloudsync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,10 @@ bool table_add_to_context (sqlite3 *db, cloudsync_context *data, table_algo algo
954954
for (int i=0; i<data->tables_alloc; ++i) {
955955
if (data->tables[i] == NULL) {
956956
data->tables[i] = table;
957+
if (i > data->tables_count - 1) ++data->tables_count;
957958
break;
958959
}
959960
}
960-
++data->tables_count;
961961

962962
return true;
963963

0 commit comments

Comments
 (0)