aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/common
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-01-11 23:01:30 -1030
committermat <git@matdoes.dev>2026-01-11 23:01:30 -1030
commit736edae2ad243f6eb3e7b01ca9b6266745cdeb24 (patch)
tree3d1ae581c5a1addca1ac48febb59a29de0fb180b /azalea-protocol/src/common
parent1accbac964168af5fa0d87cb170389f0a9d01363 (diff)
downloadazalea-drasl-736edae2ad243f6eb3e7b01ca9b6266745cdeb24.tar.xz
add fuzzer for azalea-protocol and fix a few panics
Diffstat (limited to 'azalea-protocol/src/common')
-rw-r--r--azalea-protocol/src/common/tags.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-protocol/src/common/tags.rs b/azalea-protocol/src/common/tags.rs
index f22175ee..3f9a2ef2 100644
--- a/azalea-protocol/src/common/tags.rs
+++ b/azalea-protocol/src/common/tags.rs
@@ -19,11 +19,11 @@ pub struct Tags {
impl AzaleaRead for TagMap {
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
let length = u32::azalea_read_var(buf)? as usize;
- let mut data = IndexMap::with_capacity(length);
+ let mut data = IndexMap::new();
for _ in 0..length {
let tag_type = Identifier::azalea_read(buf)?;
let tags_count = i32::azalea_read_var(buf)? as usize;
- let mut tags_vec = Vec::with_capacity(tags_count);
+ let mut tags_vec = Vec::new();
for _ in 0..tags_count {
let tags = Tags::azalea_read(buf)?;
tags_vec.push(tags);