Bug 3584 - renew COM_Compress
Status: RESOLVED WONTFIX
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 minor
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2008-03-28 18:24 EDT by /dev/humancontroller
Modified: 2011-02-11 10:17:28 EST
1 user (show)

See Also:


Attachments
the new COM_Compress (4.92 KB, patch)
2008-03-28 18:27 EDT, /dev/humancontroller
undo r1287 (480 bytes, patch)
2008-03-29 05:15 EDT, /dev/humancontroller
reorganize LoadScriptFile() (1.68 KB, patch)
2008-03-29 08:27 EDT, /dev/humancontroller

Description /dev/humancontroller 2008-03-28 18:24:12 EDT
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
Comment 1 /dev/humancontroller 2008-03-28 18:27:30 EDT
Created attachment 1712 [details]
the new COM_Compress

Sorry for the gotos and the code length, but I added some nice explanatory comments xD
Comment 2 /dev/humancontroller 2008-03-29 05:15:03 EDT
Created attachment 1713 [details]
undo r1287

also, re-add that compress pass?
Comment 3 /dev/humancontroller 2008-03-29 08:27:23 EDT
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
Comment 4 Thilo Schulz 2011-02-11 10:17:28 EST
- 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.