hungarian-algorithm-n3
hungarian-algorithm-n3 copied to clipboard
bitset_create() this->next array start from wrong address
The function uses a single allocation for three separate array. One array of c times BitSetLimb, and two arrays of (c+1) times size_t.
When the starting address of this->next is calculated, there are used: c times BitSetLimb plus only c times size_t. Now arrays this->prev and this->next are overlapping by one size_t.
I would expect that correct starting address is : this->next = (size_t *)&this->_buf[c * sizeof(BitSetLimb) + (c+1) * sizeof(size_t)];