r5324 - trunk/data/qcsrc/common
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Dec 26 16:01:22 EST 2008
Author: div0
Date: 2008-12-26 16:01:22 -0500 (Fri, 26 Dec 2008)
New Revision: 5324
Modified:
trunk/data/qcsrc/common/util.qc
Log:
tokenizer: don't free that many strings, only the ones last used
Modified: trunk/data/qcsrc/common/util.qc
===================================================================
--- trunk/data/qcsrc/common/util.qc 2008-12-26 20:11:58 UTC (rev 5323)
+++ trunk/data/qcsrc/common/util.qc 2008-12-26 21:01:22 UTC (rev 5324)
@@ -961,11 +961,7 @@
float end;
float i;
- _argc_sane = 0;
- data = 0;
- end = strlen(s);
-
- for(i = 0; i < MAX_TOKENS; ++i)
+ for(i = 0; i < _argc_sane; ++i)
{
if(_argv_sane_buffer[i])
strunzone(_argv_sane_buffer[i]);
@@ -973,6 +969,10 @@
_argv_sane_startpos[i] = 0;
}
+ _argc_sane = 0;
+ data = 0;
+ end = strlen(s);
+
for(;;)
{
// skip whitespace
More information about the nexuiz-commits
mailing list