Hey thanks Shany, your patch fixes some borked assert() statements in the C/jansson port's squelch code. Cool... I'll import them to my fork too.
BTW, regarding the C++ port... Is there any way to make this thing compile faster? It takes about 5 times longer than the C port.
Edit: whoops, my bad... There are still assert() related crashes. Stuff like this:
Code:
tome: /home/proteus/Projects/tome2/src/squeltch.c:582: condition_and_add: Assertion `c != ((void *)0)' failed.
This happens when pressing Esc while adding an automizer clause.
To be honest I don't think that assert() statement is well placed - in Angband, the Esc key means "forget I said that", so it will definitely make stuff NULL. I'm not sure yet exactly
where in the code the clause becomes NULL... Ideally though, Esc should exit the clause menu, or at least do nothing at all.
I'll see if I can hack this into shape...
Edit: yeah, to get out of the menu on Esc, one can just change
assert(foo);
to
if (!foo) return;
This works fine. I'll submit a patch.
Edit 3: no, that does not work fine. There is something very wrong here; I can't nest clauses at all.
As of right now it looks like the automizer is completely broken.Also there's a second 'and' rule at the end of the rule list, which produces a segfault if selected. Not sure what's up with that yet.
Edit 4: This is just for the C port though. Not sure about C++.