From b13e8dfb618d475b91b73ffff28c8367442b9951 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 15 Jul 2024 17:08:18 +0200 Subject: fix unicode bug --- light-client/tools/src/bin/tex_pack.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'light-client/tools/src/bin/tex_pack.rs') diff --git a/light-client/tools/src/bin/tex_pack.rs b/light-client/tools/src/bin/tex_pack.rs index 7ac3346c..60c409ff 100644 --- a/light-client/tools/src/bin/tex_pack.rs +++ b/light-client/tools/src/bin/tex_pack.rs @@ -32,7 +32,7 @@ fn main() { let file = BufReader::new(File::open(&path).unwrap()); let tex = file.lines().map(Result::unwrap).collect::>(); let name = path.file_stem().unwrap().to_str().unwrap().to_string(); - let (width, height) = (tex[0].len(), tex.len()); + let (width, height) = (tex[0].chars().count(), tex.len()); println!("adding {width}x{height} {name}"); -- cgit v1.2.3-70-g09d2