I think these two lines were accidentally swapped: https://github.com/jpcy/xatlas/blob/master/source/xatlas/xatlas.cpp#L4297-L4298
In the current implementation, there is an off-by-one error on line 4298 (xatlas.cpp); leading to a heap-buffer-overflow error caused by CRS->rowptr[cur_row + 1] in the last iteration when cur_row == M->m (the array length of CRS->rowptr is only M->m + 1).
I think these two lines were accidentally swapped: https://github.com/jpcy/xatlas/blob/master/source/xatlas/xatlas.cpp#L4297-L4298 In the current implementation, there is an off-by-one error on line 4298 (xatlas.cpp); leading to a heap-buffer-overflow error caused by
CRS->rowptr[cur_row + 1]
in the last iteration whencur_row == M->m
(the array length ofCRS->rowptr
is onlyM->m + 1
).