diff options
| author | LLLL Colonq <llll@colonq> | 2025-02-16 04:46:35 -0500 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-02-16 04:46:44 -0500 |
| commit | 2c4da6fefeb13e40be3948dd24524b82adcac3df (patch) | |
| tree | 59dcc646df056302c354ff3ed3e25fb47784ab40 /src/font.rs | |
| parent | 097c060deed5abe914631c0b0ec3a23d17eb3d56 (diff) | |
Fix saves
Diffstat (limited to 'src/font.rs')
| -rw-r--r-- | src/font.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
