sysconf SetArayData use the minimum of the buffersize or the dataLength

This commit is contained in:
LPFaint99
2012-02-01 00:04:18 -08:00
parent 8e332948bf
commit a0d6d68243
+2 -3
View File
@@ -66,10 +66,9 @@ struct SSysConfEntry
}
bool SetArrayData(u8* buffer, u16 bufferSize)
{
if (buffer && bufferSize <= dataLength)
if (buffer)
{
memcpy(data, buffer, bufferSize);
memcpy(data, buffer, min<u16>(bufferSize, dataLength));
return true;
}
return false;