Skip to content

Commit

Permalink
Fix function UnicityTable::push_back (issue #3925)
Browse files Browse the repository at this point in the history
mftraining crashed because the returned value was 1 instead of 0
for the first call of UnicityTable::push_back.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Dec 13, 2022
1 parent 1d3b410 commit 1fd8f81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ccutil/unicity_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ class UnicityTable {
int push_back(T object) {
auto idx = get_index(object);
if (idx == -1) {
table_.push_back(object);
idx = size();
idx = table_.push_back(object);
}
return idx;
}
Expand Down

0 comments on commit 1fd8f81

Please sign in to comment.