summaryrefslogtreecommitdiff
path: root/core/io/marshalls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/marshalls.cpp')
-rw-r--r--core/io/marshalls.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 1e76e2b4b2..62ccd81489 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -36,7 +36,10 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int *
const uint8_t * buf=p_buffer;
int len=p_len;
- ERR_FAIL_COND_V(len<4,ERR_INVALID_DATA);
+ if (len<4) {
+
+ ERR_FAIL_COND_V(len<4,ERR_INVALID_DATA);
+ }
uint32_t type=decode_uint32(buf);