Open irbull opened 1 month ago
The bug is when you are pointing at the first node and you call split_before
// We have this:
//
// list.front -> A <-> B <-> C <-> D <- list.back
// ^
// cur
//
//
// And we want to produce this:
//
// list.front -> A -> C <-> D <- list.back
// ^
// cur
//
//
// return.front -> None <- return.back
We don't set front
and back
to None
in this case. The length is right (it's 0), but front and back point to a node.
I am getting a double free when splitting on the first element in the list:
(╯°□°)╯︵ ┻━┻