fix: panic in color.to_string
This commit is contained in:
parent
e9735d9425
commit
c37f6d0b8d
1 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,8 @@ pub const RGB = struct {
|
|||
|
||||
pub fn to_string(v: RGB, s: *[7]u8) []u8 {
|
||||
const nib = struct {
|
||||
fn f(n: u8) u8 {
|
||||
fn f(n_: u8) u8 {
|
||||
const n = n_ & 0b1111;
|
||||
return switch (n & 0b1111) {
|
||||
0...9 => '0' + n,
|
||||
0xA...0xF => 'A' + n,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue