From: Jeff Shanholtz [mailto:jpublic@shanholtz.com]

Sent: Thursday, July 03, 2008 9:16 AM
To: submit@mamedev.org
Subject: fix for output.c unregister_client crash

My app is causing mame to crash when it unregisters itself as an output client. 
Output.c's unregister_client() is guaranteed to crash because if it finds a 
match then it ends up doing a "->next" twice -- once in the "if" body, and once 
in the "for" statement. This patch to 0.125u8 fixes this problem. It simply adds 
a "break" to the "if" body since at that point there is no need to continue.

Hope this can make it in for 0.126.
This commit is contained in:
Aaron Giles 2008-07-06 06:13:56 +00:00
parent 161b2a86e8
commit 50c5ee82e5

View File

@ -251,6 +251,7 @@ static LRESULT unregister_client(HWND hwnd, LPARAM id)
*client = (*client)->next;
free(temp);
found = TRUE;
break;
}
// return an error if not found