Region invalidated problem

If you are having problems finding or using cheats for an Emulator (particularly MAME/MESS) or have found a trick that you wish to share this is the place to do it. But please read the Cheat FAQ first.
Post Reply
ShimaPong
Posts: 1063
Joined: Wed May 21, 2003 4:19 pm
Location: Japan

Region invalidated problem

Post by ShimaPong »

In options -> search memory areas, if you choose "OFF" region then press "Shift + Delete Cheat", MAME crashes instead of "region invalidated".
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Post by ianpatt »

I haven't had a chance to test this yet, but at around line 9179, change:

Code: Select all

static void InvalidateEntireRegion(SearchInfo * search, SearchRegion * region)
{
	memset(region->status, 0, region->length);

	search->numResults -= region->numResults;
	region->numResults = 0;
}
to

Code: Select all

static void InvalidateEntireRegion(SearchInfo * search, SearchRegion * region)
{
	if(!region->status) return;
	
	memset(region->status, 0, region->length);

	search->numResults -= region->numResults;
	region->numResults = 0;
}
I'll make a diff of all of these recent changes and submit it tomorrow night.
ShimaPong
Posts: 1063
Joined: Wed May 21, 2003 4:19 pm
Location: Japan

Post by ShimaPong »

Thanks. I have confirmed that the crash problem is avoided with your fix.
Post Reply