aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xazalea-chat/src/translatable_component.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/azalea-chat/src/translatable_component.rs b/azalea-chat/src/translatable_component.rs
index edbb5a6d..c633b901 100755
--- a/azalea-chat/src/translatable_component.rs
+++ b/azalea-chat/src/translatable_component.rs
@@ -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());