浏览代码

js bugfix

Nicolas Cannasse 8 年之前
父节点
当前提交
27eedc3f6d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      hxd/FloatBuffer.hx

+ 2 - 1
hxd/FloatBuffer.hx

@@ -46,7 +46,8 @@ abstract FloatBuffer(InnerData) {
 		#if flash
 		if( v > this.length ) this.length = v;
 		#elseif js
-		while( v < this.length ) this.push(0.);
+		for( i in this.length...v )
+			this.push(0.);
 		#else
 		if( v > this.length ) this[v - 1] = 0.;
 		#end