Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
singpolyma opened this issue Feb 21, 2024 · 0 comments
Open

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

singpolyma opened this issue Feb 21, 2024 · 0 comments

Comments

@singpolyma
Copy link

::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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant