godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.7k stars 525 forks source link

Add 3 unit tests for packed arrays #1606

Closed Ivorforce closed 4 days ago

Ivorforce commented 4 days 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 4 days 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 4 days ago

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