To me it isn't clear what the (delimiter) actually...
# magic
p
To me it isn't clear what the (delimiter) actually is in the bugreport.
t
The delimiter should be marking the beginning of a new command. It will generate one undo record per thing that needs to be reversed. There will be multiple records per command. But the "undo" command will undo all records back to the next delimiter, marking the beginning of the command.
p
Ah, in that case the NULL point seems to be OK and not a bug actually. I expected the cur pointer to not go beyond the head, but due to those delimiters, it seems to be necessary that the cur pointer is set to NULL when it is at the head. I just hope magic handles this correctly everywhere
No! Magic actually crashes due to this NULL pointer when you simply press "u" too often. Just paint something, press "u" a few times and magic is gone.
I can reproduce it, let me know if you need help with reproducing it.
But that crash isn't urgent for me, my code properly detects the NULL pointer now and does not try to go beyond it anymore.
t
I am unable to reproduce the crash condition, but I have not checked the contents of the tarball and looked to see if there is an actual NULL pointer where there shouldn't be one.
p
Well, according to the (delimiter) logic, since there is no head element, you need cur to be able to be positioned before the first change and after the last change. To be before the first change, cur=head would be one step too far, so cur=NULL is the only possible value, since there is no head element that cur could point to. But there seems to be some code that isn't expecting the NULL pointer.