Add better error message when trying to decompress ZSTD with decompress_dynamic

This commit is contained in:
Dimitri Sukhankin
2026-05-04 22:01:06 +04:00
parent c3284cd696
commit e07737e0ba
+1 -1
View File
@@ -291,7 +291,7 @@ int Compression::decompress_dynamic(Vector<uint8_t> *p_dst_vect, int64_t p_max_d
#endif
} else {
// This function only supports GZip and Deflate.
ERR_FAIL_COND_V(p_mode != MODE_DEFLATE && p_mode != MODE_GZIP, Z_ERRNO);
ERR_FAIL_COND_V_MSG(p_mode != MODE_DEFLATE && p_mode != MODE_GZIP, Z_ERRNO, "Dynamic decompression is only supported with gzip, DEFLATE, and Brotli compression methods.");
int ret;
z_stream strm;