Fix a minor bug in the Projection binary decode logic

This commit is contained in:
Aaron Franke 2022-09-01 11:07:01 -05:00
parent 9a368eca43
commit 0eb420679c
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF
1 changed files with 1 additions and 1 deletions

View File

@ -510,7 +510,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
(*r_len) += sizeof(double) * 16; (*r_len) += sizeof(double) * 16;
} }
} else { } else {
ERR_FAIL_COND_V((size_t)len < sizeof(float) * 62, ERR_INVALID_DATA); ERR_FAIL_COND_V((size_t)len < sizeof(float) * 16, ERR_INVALID_DATA);
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) { for (int j = 0; j < 4; j++) {
val.matrix[i][j] = decode_float(&buf[(i * 4 + j) * sizeof(float)]); val.matrix[i][j] = decode_float(&buf[(i * 4 + j) * sizeof(float)]);