summaryrefslogtreecommitdiff
path: root/src/3rdparty/squirrel
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-03-09 23:08:23 +0000
committeryexo <yexo@openttd.org>2009-03-09 23:08:23 +0000
commit01167ea456ff5398db6aa00d2e1c661f867393e9 (patch)
treeb2aa3c1daf3c06c5f8875896ce34144e127806ca /src/3rdparty/squirrel
parent1ff06b3f9c11ed4ca382a96f0b3fdc7602db526f (diff)
downloadopenttd-01167ea456ff5398db6aa00d2e1c661f867393e9.tar.xz
(svn r15659) -Fix [Squirrel]: The garbage collection would sometimes loop (2^32 - small_value) times instead of only small_value times.
Diffstat (limited to 'src/3rdparty/squirrel')
-rw-r--r--src/3rdparty/squirrel/squirrel/sqstate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqstate.cpp b/src/3rdparty/squirrel/squirrel/sqstate.cpp
index 553262543..52cea8a4c 100644
--- a/src/3rdparty/squirrel/squirrel/sqstate.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqstate.cpp
@@ -189,6 +189,7 @@ SQSharedState::~SQSharedState()
SQCollectable *t = _gc_chain;
SQCollectable *nx = NULL;
while(t) {
+ t->UnMark();
t->_uiRef++;
t->Finalize();
nx = t->_next;
@@ -198,7 +199,7 @@ SQSharedState::~SQSharedState()
}
// assert(_gc_chain==NULL); //just to proove a theory
while(_gc_chain){
- _gc_chain->_uiRef++;
+ _gc_chain->_uiRef--;
_gc_chain->Release();
}
#endif