Properly handle cleanup of the Eta Vulpeculae II stringtable (Bug 1028)

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2915 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2008-02-01 08:09:07 +00:00
parent f579d17430
commit 4c3e4cf122
3 changed files with 10 additions and 15 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.7:
- Androsynth ruins freeing condition now uses cycles (Bug #1028) - Michael
- .rmp files now carry the types of the targets - Michael
- Joystick threshold defaults to 10,000, not 0 (Bug #1046) - Michael
- Remove MEM_HANDLEs from everywhere outside of memlib - Michael
-11
View File
@@ -62,10 +62,6 @@ GenerateAndrosynth (BYTE control)
{
pSolarSysState->SysInfo.PlanetInfo.ScanRetrieveMask[ENERGY_SCAN]
&= ~(1L << i);
/* so won't get freed in lander.c */
CaptureStringTable (GetStringTable (
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString
));
if (!(pSolarSysState->SysInfo.PlanetInfo.ScanRetrieveMask[ENERGY_SCAN]
& (1L << (i + 16))))
{
@@ -86,13 +82,6 @@ GenerateAndrosynth (BYTE control)
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString,
1
);
if (GetStringTableIndex (
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString
) == 0)
/* so will get freed in lander.c */
ReleaseStringTable (
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString
);
}
}
}
+9 -4
View File
@@ -850,10 +850,15 @@ CheckObjectCollision (COUNT index)
if (!(pSolarSysState->SysInfo.PlanetInfo.ScanRetrieveMask[scan] &
(1L << which_node)))
{
if (DestroyStringTable (ReleaseStringTable (
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString
)))
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString = 0;
/* If our discovery strings have cycled, we're done */
if (GetStringTableIndex (
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString) == 0)
{
if (DestroyStringTable (ReleaseStringTable (
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString
)))
pSolarSysState->SysInfo.PlanetInfo.DiscoveryString = 0;
}
}
else
{