From 2a9e97d7429f93a224fc366f78eed75308f3fc38 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 23 Sep 2019 22:44:30 -0400 Subject: fix erorr in previous commit --- Makefile | 2 +- chip8.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a7976fe..b504d98 100755 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ win: BIN = chip8.exe all: executable win: executable -all: LDFLAGS = -lncursesw -lpthread +all: LDFLAGS = -lncursesw -ltinfow -lpthread win: LDFLAGS = ./win/pdcurses.a executable: chip8.c ui.c util.c diff --git a/chip8.c b/chip8.c index ad1b6bf..25e94a7 100644 --- a/chip8.c +++ b/chip8.c @@ -114,7 +114,7 @@ void vm_thread(void* v) { vm.Vx[hex_char(str[1])] ^= vm.Vx[hex_char(str[2])]; break; case '4': - vm.Vx[hex_char(str[1])] += vm.Vx[hex_char(str[2])] + vm.Vx[hex_char(str[1])] += vm.Vx[hex_char(str[2])]; if (vm.Vx[hex_char(str[1])] + vm.Vx[hex_char(str[2])] > 255) { vm.Vx[15] = 1; vm.Vx[hex_char(str[1])] &= 0x255; @@ -122,7 +122,6 @@ void vm_thread(void* v) { vm.Vx[15] = 0; } break; - } } -- cgit v1.2.3-101-g0448