In APT_CheckNew3DS_*, properly load+check the retval from the cmdbuf when svcSendSyncRequest was successful. In APT_CheckNew3DS(), added code to check for out nullptr, and code to clear out.
This commit is contained in:
parent
f631036063
commit
0ec23dc90a
@ -1101,13 +1101,15 @@ Result APT_CheckNew3DS_Application(Handle* handle, u8 *out)
|
||||
Result ret=0;
|
||||
if((ret=svcSendSyncRequest(*handle)))return ret;
|
||||
|
||||
if(ret==0)ret = cmdbuf[1];
|
||||
|
||||
if(out)
|
||||
{
|
||||
*out = 0;
|
||||
if(ret==0)*out=cmdbuf[2];
|
||||
}
|
||||
|
||||
return cmdbuf[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
Result APT_CheckNew3DS_System(Handle* handle, u8 *out)
|
||||
@ -1120,19 +1122,25 @@ Result APT_CheckNew3DS_System(Handle* handle, u8 *out)
|
||||
Result ret=0;
|
||||
if((ret=svcSendSyncRequest(*handle)))return ret;
|
||||
|
||||
if(ret==0)ret = cmdbuf[1];
|
||||
|
||||
if(out)
|
||||
{
|
||||
*out = 0;
|
||||
if(ret==0)*out=cmdbuf[2];
|
||||
}
|
||||
|
||||
return cmdbuf[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
Result APT_CheckNew3DS(Handle* handle, u8 *out)
|
||||
{
|
||||
Result ret=0;
|
||||
|
||||
if(out==NULL)return -1;
|
||||
|
||||
*out = 0;
|
||||
|
||||
if(__apt_new3dsflag_initialized)
|
||||
{
|
||||
*out = __apt_new3dsflag;
|
||||
|
Loading…
Reference in New Issue
Block a user