Posted: 14th Nov 2011 5:02
I was trying to write some code that overwrites the assignment and plus operators for my text class, and the game crashes immediately upon running in this block of code in chashedlist.h:

+ Code Snippet
template<class T> T* cHashedList<T>::GetItem( UINT iID )
{
	UINT index = HashIndex( iID );
	cHashedItem *pItem = m_pHashedItems[ index ];
	while( pItem )
	{
		if ( pItem->m_iID == iID ) return pItem->m_pItem;
		pItem = pItem->m_pNextItem;
	}

	return UNDEF;
}


it crashes at the second assignment statement in that function. Is this a bug or intended behavior?

Thanks!
Posted: 14th Nov 2011 5:40
well, I've determined it has nothing to do with the overridden operators, so that's a relief, still not sure what's causing the game to crash at that point.
Posted: 15th Nov 2011 1:58
I've not seen this bug before, can you email me some code that produces a crash?
Posted: 15th Nov 2011 2:25
Well, I deleted it yesterday when I realized it had nothing to do with what I added...I'll re-duplicate the code, and see if the problem presents itself again.

I'm kind of new to the forums, how do I send you an email?
Posted: 16th Nov 2011 18:15
The email button below a persons post contains their email address so they don't have to type it in plain text and risk getting spam from bots.