1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

fix panic in azalea-chat i hope

This commit is contained in:
mat 2023-04-22 01:14:57 -05:00
parent 8215331381
commit 67dc5b367f

View file

@ -55,7 +55,7 @@ impl TranslatableComponent {
let mut built_text = String::new();
let mut components = Vec::new();
while i < template.len() {
while i < template.chars().count() {
if template.chars().nth(i).unwrap() == '%' {
let Some(char_after) = template.chars().nth(i + 1) else {
built_text.push(template.chars().nth(i).unwrap());