Fix bug with drawing scan progress before calling ui.init()

This triggered an invalid integer cast that wasn't caught with Zig's
LLVM backend, but it did trigger on the native x86_64 backend.
This commit is contained in:
Yorhel 2025-08-19 14:17:51 +02:00
parent 5129de737e
commit 19cfdcf543

View file

@ -451,7 +451,9 @@ pub fn draw() void {
switch (main.config.scan_ui.?) {
.none => {},
.line => drawConsole(),
.full => switch (global.state) {
.full => {
ui.init();
switch (global.state) {
.done => {},
.err => drawError(),
.zeroing => {
@ -470,6 +472,7 @@ pub fn draw() void {
}
},
.running => drawProgress(),
}
},
}
}