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] }