From bebaef4be9a87d92b11bc29a002a531a9d1fa5d7 Mon Sep 17 00:00:00 2001 From: dankcushions Date: Fri, 13 May 2016 16:21:37 +0100 Subject: Defensive code to avoid SEGFAULT --- libpcsxcore/plugins.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index 3d0ed3c..1369b1c 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -384,8 +384,8 @@ static int bufcount, bufc; //PadDataS padd1, padd2; unsigned char _PADstartPollMultitap(PadDataS padd[4]) { - int i=0; - int decallage=2; + int i=0; + int decallage=2; bufc = 0; PadDataS pad; for(i=0;i<4;i++){ @@ -626,7 +626,7 @@ unsigned char CALLBACK PAD2__startPoll(int pad) { return _PADstartPoll(&padd); }else{ //a multitap is plugged : refresh all pad. - int i=pad_index; + int i=0; PadDataS padd[4]; for(i=0;i<4;i++){ PAD2_readPort2(&padd[i],i+pad_index); -- cgit v1.2.3