summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLPFaint99 <lpfaint99@gmail.com>2011-08-21 21:10:58 -0700
committerLPFaint99 <lpfaint99@gmail.com>2012-02-01 00:04:18 -0800
commita0d6d682434852068fca1f6411dd130ebca366bb (patch)
tree00b663739680aca8e79099b451f3dfe3d84d46d3 /Source/Core
parent8e332948bff6355daaac33da013a05f8919ad084 (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.h5
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;