Skip to content

Commit

Permalink
[MP] Fix encoding of "raw" RPCs with empty PackedByteArray
Browse files Browse the repository at this point in the history
  • Loading branch information
Faless committed Aug 8, 2024
1 parent 03afb92 commit c366feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/multiplayer_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Error MultiplayerAPI::encode_and_compress_variants(const Variant **p_variants, i
if (r_raw && p_count == 1) {
*r_raw = false;
const Variant &v = *(p_variants[0]);
if (v.get_type() == Variant::PACKED_BYTE_ARRAY) {
if (v.get_type() == Variant::PACKED_BYTE_ARRAY && v.operator PackedByteArray().size() > 0) {
*r_raw = true;
const PackedByteArray pba = v;
if (p_buffer) {
Expand Down

0 comments on commit c366feb

Please sign in to comment.