The original one is @ https://sourceforge.net/p/astyle/bugs/422/.
I tried released one, say, Astyle 2.06. It also crashed with the same root cause.
Use --max-code-length=200 -p d:\1.txt to reproduce and debug.
The content of 1.txt is as below(only one line).
) ? (
The root cause is the buggy code below:
else if (sequence == "+" || sequence == "-" || **sequence == "?**")
{
if (charNum > 0
&& !isInExponent()
&& (isLegalNameChar(currentLine[charNum - 1])
isInExponent() would assert failure/crash if sequence is '?'.
BTW: You should use debug version instead of release one because it's assertion failure.
Fixed.
Where can I get the latest code? I need to merge the fix to my copy. Thanks! It seemed that the code in SF is not the latest.
It will be available with the next commit to subversion. I need to add a few more changes. It should be available in a few days.