diff options
| author | LPFaint99 <lpfaint99@gmail.com> | 2011-08-21 21:10:58 -0700 |
|---|---|---|
| committer | LPFaint99 <lpfaint99@gmail.com> | 2012-02-01 00:04:18 -0800 |
| commit | a0d6d682434852068fca1f6411dd130ebca366bb (patch) | |
| tree | 00b663739680aca8e79099b451f3dfe3d84d46d3 /Source/Core | |
| parent | 8e332948bff6355daaac33da013a05f8919ad084 (diff) | |
sysconf SetArayData use the minimum of the buffersize or the dataLength
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/Src/SysConf.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/Common/Src/SysConf.h b/Source/Core/Common/Src/SysConf.h index 119cc3c45a..fb9c775828 100644 --- a/Source/Core/Common/Src/SysConf.h +++ b/Source/Core/Common/Src/SysConf.h @@ -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; |
