]> Chaos Git - corbenik/ctrulib.git/commitdiff
Change it back to snprintf().
authorprofi200 <fd3194@gmx.de>
Sun, 1 Mar 2015 19:28:22 +0000 (20:28 +0100)
committerprofi200 <fd3194@gmx.de>
Sun, 1 Mar 2015 19:28:22 +0000 (20:28 +0100)
libctru/source/services/am.c

index 2671e55654806880a6e9de62ab72487fce700a82..e6c84a8eed07adfa7a726e5573c7b09fdb396a75 100644 (file)
@@ -199,7 +199,7 @@ Result AM_GetTitleProductCode(u8 mediatype, u64 titleID, char* productCode)
        if((ret = svcSendSyncRequest(amHandle))!=0) return ret;
 
        // The product code string can use the full 16 bytes without NULL terminator
-       if(productCode) memcpy(productCode, &cmdbuf[2], 16);
+       if(productCode) snprintf(productCode, 16, "%s", (char*)&cmdbuf[2]);
 
        return (Result)cmdbuf[1];
 }