Merge pull request #16033 from poke1024/marshalls-dict
Detects crash-related marshalling errors due to NAN values
This commit is contained in:
commit
cbd849d13f
1 changed files with 3 additions and 1 deletions
|
@ -1211,7 +1211,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
|
|||
r_len += len;
|
||||
if (buf)
|
||||
buf += len;
|
||||
encode_variant(d[E->get()], buf, len, p_object_as_id);
|
||||
Variant *v = d.getptr(E->get());
|
||||
ERR_FAIL_COND_V(!v, ERR_BUG);
|
||||
encode_variant(*v, buf, len, p_object_as_id);
|
||||
ERR_FAIL_COND_V(len % 4, ERR_BUG);
|
||||
r_len += len;
|
||||
if (buf)
|
||||
|
|
Loading…
Reference in a new issue