godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.75k stars 577 forks source link

Add 3 unit tests for packed arrays #1606

Closed Ivorforce closed 1 month ago

Ivorforce commented 1 month ago

This is rather a bug report than a pull request (though the unit tests don't hurt if they stay). The unit tests (should) currently have the following status:

I don't know much about godot-cpp and hope this is enough repro for someone to conjure a fix.

Ivorforce commented 1 month ago

Hmmm... odd that the tests succeed here, because the following code definitely crashes my client:

    PackedByteArray x;
    x.append(2);
    PackedByteArray b = PackedByteArray((PackedByteArray&) a);

That's on 1cce4d15abc3afb22724f9bf083ed7769330b43e.

Ivorforce commented 1 month ago

Eh... Something went wrong. I'll just make another PR.