mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
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:
parent
5129de737e
commit
19cfdcf543
1 changed files with 22 additions and 19 deletions
|
|
@ -451,7 +451,9 @@ pub fn draw() void {
|
||||||
switch (main.config.scan_ui.?) {
|
switch (main.config.scan_ui.?) {
|
||||||
.none => {},
|
.none => {},
|
||||||
.line => drawConsole(),
|
.line => drawConsole(),
|
||||||
.full => switch (global.state) {
|
.full => {
|
||||||
|
ui.init();
|
||||||
|
switch (global.state) {
|
||||||
.done => {},
|
.done => {},
|
||||||
.err => drawError(),
|
.err => drawError(),
|
||||||
.zeroing => {
|
.zeroing => {
|
||||||
|
|
@ -470,6 +472,7 @@ pub fn draw() void {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.running => drawProgress(),
|
.running => drawProgress(),
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue