From: profi200 Date: Sun, 1 Mar 2015 19:28:22 +0000 (+0100) Subject: Change it back to snprintf(). X-Git-Tag: v0.5.0~10^2~1 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=02b68eb1ae915d2e4a70e1b2ba87e4c87def54ba;p=corbenik%2Fctrulib.git Change it back to snprintf(). --- diff --git a/libctru/source/services/am.c b/libctru/source/services/am.c index 2671e55..e6c84a8 100644 --- a/libctru/source/services/am.c +++ b/libctru/source/services/am.c @@ -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]; }