mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix decompress PoolByteArray crash
This commit is contained in:
@@ -591,9 +591,9 @@ struct _VariantCall {
|
||||
|
||||
int buffer_size = (int)(*p_args[0]);
|
||||
|
||||
if (buffer_size < 0) {
|
||||
if (buffer_size <= 0) {
|
||||
r_ret = decompressed;
|
||||
ERR_FAIL_MSG("Decompression buffer size is less than zero.");
|
||||
ERR_FAIL_MSG("Decompression buffer size must be greater than zero.");
|
||||
}
|
||||
|
||||
decompressed.resize(buffer_size);
|
||||
|
||||
Reference in New Issue
Block a user