Skip to content

Commit c3e2177

Browse files
committed
Update
1 parent 20a5844 commit c3e2177

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/comp_types/comp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ using namespace GanakInt;
2828

2929
Comp* GanakInt::copy_comp(const Comp* other, const Counter* counter) {
3030
Comp* ptr = reserve_comp_space(other->nVars(), other->num_long_cls());
31+
ptr->clear();
3132
const uint32_t* p = other->vs_cls_data();
3233
while(*p != sentinel) {
3334
if (counter->is_unknown(*p)) ptr->add_var(*p);
3435
p++;
3536
}
3637
ptr->close_vars_data();
37-
p++;
38+
p++; // skip sentinel
3839
while(*p != sentinel) {
3940
ptr->add_cl(*p);
4041
p++;

0 commit comments

Comments
 (0)