mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
fix out-of-bounds
Co-authored-by: Alexander Tokmakov <tavplubix@gmail.com>
This commit is contained in:
parent
941cceda7f
commit
9a231cf49a
@ -161,9 +161,9 @@ void MergeTreeIndexAggregatorAnnoy::update(const Block & block, size_t * pos, si
|
||||
|
||||
index->add_item(index->get_n_items(), array.data());
|
||||
/// add all rows from 1 to num_rows - 1 (this is the same as the beginning of the last element)
|
||||
for (size_t current_row = 0; current_row < num_rows; ++current_row)
|
||||
for (size_t current_row = 1; current_row < num_rows; ++current_row)
|
||||
{
|
||||
index->add_item(index->get_n_items(), &array[offsets[current_row]]);
|
||||
index->add_item(index->get_n_items(), &array[offsets[current_row - 1]]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user