Moosh reported this to me yesterday:
If a script contains a lexical error (tested with CHAR_DOUBLEQUOTE) and the script is over a certain length (greater than 16.4 KB), ZC will crash while parsing it.
I've tested this, and can confirm it. The easiest fix would possibly be to halt the compiler on a lexical error, which I think would be best in general; but finding the cause of this would probably be good.
Affects 2.50.2; tested with Win 7.
Wait? ZC Doesn't parse scripts, Do you mean ZQuest?
I've never been able to reproduce any of these compiler crashes over the years.
Can you try running it in the debugger next time you test it?
Me neither, it's quite weird. I do get lexical errors from double quotes some times though. "Which you shouldn't it parses as an array of shorts if you set it up as such"
I'm going to force a compiler halt for lexical errors. That's the only easy solution, and IMO no lexing error should be suppressed, except truncation; as Joe user won't even notice them in their rush to compile.
I could just add SINGLEQUOTE as a halt though, or better still, make ' return the same as DOUBLEQUOTE so that we can just use the char to input QUOTEDSTRINGS. (i.e. Both[FONT=Courier New] '[/FONT] and [FONT=Courier New]" [/FONT]would be read the same way.)
[MENTION=56506]Tamamo[/MENTION]: Aye, I meant ZQuest.
Unfortunately the way it's set up now, single quotes are for characters I think, and double quotes for strings. At least I think that's it.
Has this only been confirmed with double quotation marks? That's the only thing I'm seeing a problem with. That would be from trying to read everything after it as a single string; it wouldn't even get as far as detecting an error.
Edit: Nope, I'm wrong. It was crashing printing the error. Considering this fixed unless someone can confirm another cause.
Saffith wrote:Has this only been confirmed with double quotation marks? That's the only thing I'm seeing a problem with. That would be from trying to read everything after it as a single string; it wouldn't even get as far as detecting an error.Edit: Nope, I'm wrong. It was crashing printing the error. Considering this fixed unless someone can confirm another cause.
Can you elaborate on the exact cause of this, please, and what you changed?
Tamamo wrote:Unfortunately the way it's set up now, single quotes are for characters I think, and double quotes for strings. At least I think that's it.
They return SINGLECHAR, so, I may as well leave them be, but making the compiler halt on lexing errors is just common sense.
sprintf overflow. The error message buffer only has room for 511 characters.