From 2c4da6fefeb13e40be3948dd24524b82adcac3df Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Sun, 16 Feb 2025 04:46:35 -0500 Subject: Fix saves --- src/font.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/font.rs') diff --git a/src/font.rs b/src/font.rs index 3074dff..e431896 100644 --- a/src/font.rs +++ b/src/font.rs @@ -92,7 +92,7 @@ impl Bitmap { texcoords.push(tcbase + glam::Vec2::new(cwidth, cheight)); texcoords.push(tcbase + glam::Vec2::new(cwidth, 0.0)); texcoords.push(tcbase); - let c = if let Some(c) = color.get(i) { + let c = if let Some(c) = color.get(if color.len() == 0 { 0 } else { i % color.len() }) { *c } else { glam::Vec3::new(1.0, 1.0, 1.0) -- cgit v1.2.3