mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 06:46:39 +02:00
protect against misuse of Sysmem::setSubData()
This commit is contained in:
parent
670e07bbf5
commit
cdce598c35
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ Size Sysmem::setData( Size size, const Byte* bytes ) {
|
|||
}
|
||||
|
||||
Size Sysmem::setSubData( Size offset, Size size, const Byte* bytes) {
|
||||
if (size && ((offset + size) <= getSize()) && bytes) {
|
||||
if (_data && size && ((offset + size) <= getSize()) && bytes) {
|
||||
memcpy( _data + offset, bytes, size );
|
||||
return size;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue