gdd: fix issue when copying from an emtpy array
if the source array is empty, the index of the first element to copy (0) being equal to the source array size (0) does not constitute an out-of-bounds condition
This commit is contained in:
@@ -1353,7 +1353,7 @@ gddStatus gdd::put ( const gdd * dd )
|
||||
// clip to upper limit of source
|
||||
aitUint32 srcCopySize;
|
||||
const aitUint32 unusedSrcBelow = srcCopyFirst - srcFirst;
|
||||
if ( srcElemCount <= unusedSrcBelow ) {
|
||||
if ( srcElemCount && srcElemCount <= unusedSrcBelow ) {
|
||||
return gddErrorOutOfBounds;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user