mirror of https://github.com/fairyglade/ly.git
Backport: Fix big clock UB in ReleaseSafe
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
d12850889c
commit
f983c6b19b
|
@ -34,24 +34,24 @@ pub fn alphaBlit(x: usize, y: usize, tb_width: usize, tb_height: usize, cells: [
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn toBigNumber(char: u8, bigclock: Bigclock) []const u21 {
|
fn toBigNumber(char: u8, bigclock: Bigclock) [SIZE]u21 {
|
||||||
const locale_chars = switch (bigclock) {
|
const locale_chars = switch (bigclock) {
|
||||||
.fa => fa.locale_chars,
|
.fa => fa.locale_chars,
|
||||||
.en => en.locale_chars,
|
.en => en.locale_chars,
|
||||||
.none => unreachable,
|
.none => unreachable,
|
||||||
};
|
};
|
||||||
return switch (char) {
|
return switch (char) {
|
||||||
'0' => &locale_chars.ZERO,
|
'0' => locale_chars.ZERO,
|
||||||
'1' => &locale_chars.ONE,
|
'1' => locale_chars.ONE,
|
||||||
'2' => &locale_chars.TWO,
|
'2' => locale_chars.TWO,
|
||||||
'3' => &locale_chars.THREE,
|
'3' => locale_chars.THREE,
|
||||||
'4' => &locale_chars.FOUR,
|
'4' => locale_chars.FOUR,
|
||||||
'5' => &locale_chars.FIVE,
|
'5' => locale_chars.FIVE,
|
||||||
'6' => &locale_chars.SIX,
|
'6' => locale_chars.SIX,
|
||||||
'7' => &locale_chars.SEVEN,
|
'7' => locale_chars.SEVEN,
|
||||||
'8' => &locale_chars.EIGHT,
|
'8' => locale_chars.EIGHT,
|
||||||
'9' => &locale_chars.NINE,
|
'9' => locale_chars.NINE,
|
||||||
':' => &locale_chars.S,
|
':' => locale_chars.S,
|
||||||
else => &locale_chars.E,
|
else => locale_chars.E,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue