mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-15 13:31:40 +00:00
sysconf SetArayData use the minimum of the buffersize or the dataLength
This commit is contained in:
parent
8e332948bf
commit
a0d6d68243
1 changed files with 2 additions and 3 deletions
|
@ -66,10 +66,9 @@ struct SSysConfEntry
|
||||||
}
|
}
|
||||||
bool SetArrayData(u8* buffer, u16 bufferSize)
|
bool SetArrayData(u8* buffer, u16 bufferSize)
|
||||||
{
|
{
|
||||||
|
if (buffer)
|
||||||
if (buffer && bufferSize <= dataLength)
|
|
||||||
{
|
{
|
||||||
memcpy(data, buffer, bufferSize);
|
memcpy(data, buffer, min<u16>(bufferSize, dataLength));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue