]> Chaos Git - corbenik/ctrulib.git/commitdiff
Updated CheckNew3DS code. Now the out value is cleared first, then the out value...
authoryellows8 <yellows8@users.noreply.github.com>
Sun, 2 Nov 2014 02:11:19 +0000 (22:11 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Sun, 2 Nov 2014 02:11:19 +0000 (22:11 -0400)
libctru/source/services/apt.c

index d13d15e8060701df3cf525ae936b60231024587b..91e1c175376c0812867556d640a5f7f5c38662a4 100644 (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];
 }