Closed uroboro closed 4 years ago
Thanks for the detailed insight! I started maintaining the project in June, so I don't know why the code looked like that in the first place. Looking at the commit history, it seems to originate five years ago, which is why it's surprising to see no reports until very recently.
Not directed at you, but towards Howett: I see no reason to get snarky and call things "bad code". All code have issues. I know this is none of his responsibilities, but reading into the issue and not forwarding it to the responsible developer(s) seems like bad practice to me. There's a reason why things are kept open source.
With that being said, I'm happy that you took the time to bring this to our attention!
This snippet of code has caused many issues since this project's inception:
https://github.com/atomikpanda/libcolorpicker/blob/c5b51a29665442434b505a64eece036fd2b523b7/PFSimpleLiteColorCell.mm#L28-L32
However, I cannot blame the developers to know about the core cause of the issue because it is an odd behaviour.
The problem is that
[self.specifier properties][@"libcolorpicker"]
returns an NSDictionary, but the code assumes it will be an NSMutableDictionary. Here's DHowett explaining this issue on June 6 on #theos on saurik's IRC server:The solution is to simply change:
https://github.com/atomikpanda/libcolorpicker/blob/c5b51a29665442434b505a64eece036fd2b523b7/PFSimpleLiteColorCell.mm#L29
to this:
self.options = [[self.specifier properties][@"libcolorpicker"] mutableCopy];