Bug in ext_linklist.h API

Luigi Castelli's icon

Hi C74,

I think I found a bug in the function linklist_reverse()

Steps to reproduce:

1 - Build a linked list with whatever object or custom struct you like.
Flags setting don't matter. For the sake of demonstration let's say it's a 7 node linked list.
That's what I used when I found the bug, but it ought to happen with lists of any length.

2 - Call linklist_reverse() TWICE IN A ROW on the list.
You'll see that the first time the function will perform as expected.
However, the second time around the linked list will be destroyed.
(i.e. pointer references are lost)
Only one node will still be part of the list.

I am on a MacBook Pro running Mac OS 10.6.2.

Please, someone confirm that they can reproduce.

Thanks.

- Luigi

Luigi Castelli's icon

Ok, thanks Vanille.

Can someone at C74 confirm?
Could it be fixed for the next SDK revision?

Thank you much.

- Luigi

Timothy Place's icon

Thanks for the reports. I'm looking into and hope to have a fix for Max 5.1.4.

Luigi Castelli's icon

Great!

Thanks Tim.

- Luigi

Timothy Place's icon

Just to update, this bug is fixed for the upcoming Max 5.1.4 update.

Cheers