diff --git a/nemu/src/device/vga.c b/nemu/src/device/vga.c index 4914906..0e4118c 100644 --- a/nemu/src/device/vga.c +++ b/nemu/src/device/vga.c @@ -75,7 +75,7 @@ static inline void update_screen() { void vga_update_screen() { // TODO: call `update_screen()` when the sync register is non-zero, // then zero out the sync register - if (*sync_reg) { + if (*sync_reg != 0) { update_screen(); *sync_reg = 0; }