diff options
| author | mat <git@matdoes.dev> | 2026-01-11 23:01:30 -1030 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-01-11 23:01:30 -1030 |
| commit | 736edae2ad243f6eb3e7b01ca9b6266745cdeb24 (patch) | |
| tree | 3d1ae581c5a1addca1ac48febb59a29de0fb180b /azalea-chat/src/component.rs | |
| parent | 1accbac964168af5fa0d87cb170389f0a9d01363 (diff) | |
| download | azalea-drasl-736edae2ad243f6eb3e7b01ca9b6266745cdeb24.tar.xz | |
add fuzzer for azalea-protocol and fix a few panics
Diffstat (limited to 'azalea-chat/src/component.rs')
| -rw-r--r-- | azalea-chat/src/component.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index 637aafc7..c64ee559 100644 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -408,6 +408,9 @@ impl<'de> Deserialize<'de> for FormattedText { )); } let json_array = json.as_array().unwrap(); + if json_array.is_empty() { + return Ok(FormattedText::default()); + } // the first item in the array is the one that we're gonna return, the others // are siblings let mut component = |
