Back to the Vavoom Forum Archives


Forum

[Fixed] [SVN 3034] HitFloorType uses uninitialized reference

Thu, 17 Jan 2008 12:43:08

Crimson Wizard

I found what caused a crash in EntityEx::HitFloorType method. If you look at the conditional blocks:
	if (smallsplash)
	{
		if (SInfo->SmallClass)
		{
			A = Spawn(class<EntityEx>(SInfo->SmallClass), org);
			A.FloorClip += SInfo->SmallClip;
			if (SInfo->SmallSound)
			{
				A.PlaySound(SInfo->SmallSound, CHAN_VOICE);
			}
		}
	}
	else
	{
		if (SInfo->BaseClass)
		{
-------> Spawn(class<EntityEx>(SInfo->BaseClass), org); <-------
			if (SInfo->Sound && !SInfo->ChunkClass)
			{
				A.PlaySound(SInfo->Sound, CHAN_VOICE);
			}
		}
		if (SInfo->ChunkClass)
		{
...
The "else" block uses uniitalized 'A' reference after "if (SInfo->BaseClass)".
Thu, 17 Jan 2008 17:36:08

Janis Legzdinsh

Fixed.

Back to the Vavoom Forum Archives