HaxeFoundation/hxcpp

Pointer_obj::ofArray changes length of empty array from 0 to 1

singpolyma opened this issue · 0 comments

::Array<::Dynamic> thing = ...;
// thing->length is 0
Pointer_obj::ofArray(thing)
//thing->length is 1

This seems to be caused by doing &array[0] if instead I manually do cpp::AutoCast(&thing) then it works as expected.

This affects any use of Pointer.ofArray on empty array from the Haxe side as well.