Explorar o código

Clarify Loop end condition in BufferGeometry.merge()

Takahiro %!s(int64=6) %!d(string=hai) anos
pai
achega
9b4df26fce
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/BufferGeometry.js

+ 1 - 1
src/core/BufferGeometry.js

@@ -822,7 +822,7 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 			var attributeSize = attribute2.itemSize;
 
-			for ( var i = 0, j = attributeSize * offset; i < attributeArray2.length; i ++, j ++ ) {
+			for ( var i = 0, j = attributeSize * offset; i < attributeArray2.length && j < attributeArray1.length; i ++, j ++ ) {
 
 				attributeArray1[ j ] = attributeArray2[ i ];