subarray fix

This commit is contained in:
Joshua Granick
2017-03-21 12:17:51 -07:00
committed by GitHub
parent ece2acbebb
commit e5070c5ed4

View File

@@ -164,7 +164,7 @@ package lime.utils;
#if !no_typedarray_inline inline #end #if !no_typedarray_inline inline #end
function subarray<T_subarray>( begin:Int, end:Null<Int> = null ) : T_subarray { function subarray<T_subarray>( begin:Int, end:Null<Int> = null ) : T_subarray {
if (end == null) end == length; if (end == null) end = length;
var len = end - begin; var len = end - begin;
var byte_offset = toByteLength(begin) + byteOffset; var byte_offset = toByteLength(begin) + byteOffset;
@@ -824,4 +824,4 @@ abstract TypedArrayType(Int) from Int to Int {
//#error "ArrayBufferIO is not used on js target, use DataView instead" //#error "ArrayBufferIO is not used on js target, use DataView instead"
#end //!js #end //!js