diff --git a/Makefile b/Makefile index 2d2f4c5..b051c76 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CFLAGS = -g CPPFLAGS = -Wall -Wextra -pedantic -std=gnu99 chatty: main.o liblist.a - $(CC) $(CFLAGS) -L. -o chatty main.o -llist -lpthread -lncurses -lnotcurses + $(CC) $(CFLAGS) -L. -o chatty main.o -llist -lpthread -lnotcurses -lnotcurses-core main.o: main.c $(CC) $(CFLAGS) $(CPPFLAGS) -I. -c -o main.o main.c diff --git a/main.c b/main.c index ef45687..27cd87b 100644 --- a/main.c +++ b/main.c @@ -321,10 +321,10 @@ int main(int argc, char* argv[]) { pthread_mutex_destroy(&sendmut); pthread_mutex_destroy(&receivemut); - notcurses_stop(nc); close(sockfd); close(confd); printf("Connection closed.\n"); + notcurses_stop(nc); return 0; }