Selaa lähdekoodia

Clarify Loop end condition in BufferGeometry.merge()

Takahiro 6 vuotta sitten
vanhempi
commit
9b4df26fce
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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 ];