I've rewritten COM_Compress function that was mentioned in r1287.
Changes:
- newlines are preserved (also, LF and CRFL are merged into LF), so that parse error messages report the correct line number
- fixed a bug (possibly more) like identifying the /*/ sequence as an opened-and-closed /* */ comment
- minor performance boost xD
Created attachment 1714[details]
reorganize LoadScriptFile()
In this...
- we don't need to clear the memory twice
- if there's a segfault at that COM_Compress line, I think it's (when BOTLIB is not defined) when script->length is referenced after script is set to NULL
- fixed a bug (possibly more) like identifying the /*/ sequence as an
opened-and-closed /* */ comment
You must not change that. There might be legacy map files that rely on this "/* /" bug. Plus add to that that you used a shitload of gotos makes me reject this patch. I'm sorry.
Created attachment 1712 [details] the new COM_Compress Sorry for the gotos and the code length, but I added some nice explanatory comments xD
Created attachment 1713 [details] undo r1287 also, re-add that compress pass?
Created attachment 1714 [details] reorganize LoadScriptFile() In this... - we don't need to clear the memory twice - if there's a segfault at that COM_Compress line, I think it's (when BOTLIB is not defined) when script->length is referenced after script is set to NULL