Updated CheckNew3DS code. Now the out value is cleared first, then the out value is only set to the cmdreply data when ret is zero.

This commit is contained in:
yellows8 2014-11-01 22:11:19 -04:00
parent c8795b1b79
commit 4e90fbb905

View File

@ -808,7 +808,11 @@ Result APT_CheckNew3DS_Application(Handle* handle, u8 *out)
Result ret=0;
if((ret=svcSendSyncRequest(*handle)))return ret;
if(out)*out=cmdbuf[2];
if(out)
{
*out = 0;
if(ret==0)*out=cmdbuf[2];
}
return cmdbuf[1];
}
@ -823,7 +827,11 @@ Result APT_CheckNew3DS_System(Handle* handle, u8 *out)
Result ret=0;
if((ret=svcSendSyncRequest(*handle)))return ret;
if(out)*out=cmdbuf[2];
if(out)
{
*out = 0;
if(ret==0)*out=cmdbuf[2];
}
return cmdbuf[1];
}