From f2d9fb75c73d4dd677475d93ad6bb623cb4fb680 Mon Sep 17 00:00:00 2001 From: liaoxianglian Date: Wed, 18 Mar 2026 10:47:43 +0800 Subject: [PATCH] =?UTF-8?q?fix/=E8=A7=A3=E5=86=B3=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E5=80=BC=E6=95=B0=E7=BB=84=E9=95=BF=E5=BA=A6bug-lxl-0318?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/qelmt/aci_colors.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qelmt/aci_colors.rs b/src/qelmt/aci_colors.rs index 3140060..64c354b 100644 --- a/src/qelmt/aci_colors.rs +++ b/src/qelmt/aci_colors.rs @@ -260,5 +260,8 @@ pub const ACI_COLORS: [(u8,u8,u8); 255] = [ ]; pub fn aci_to_rgb(aci: u8) -> (u8,u8,u8) { + if(aci >= ACI_COLORS.len() as u8) { + return (255,255,255); + } ACI_COLORS[aci as usize] }