From f1a6af2d357db94be6cb5a8d1314249805b6af35 Mon Sep 17 00:00:00 2001 From: SuperNovaa41 Date: Wed, 24 Jan 2024 11:14:46 -0500 Subject: [PATCH] fix: forgot to check the correct output of strcmp --- src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 03d18cb..cbd6715 100644 --- a/src/main.c +++ b/src/main.c @@ -15,7 +15,6 @@ * TODO: we need to check the csv file for duplicates * TODO: allow us to remove a book from the csv and update the ids */ - void do_ISBN_get(char* argv[]) { // want to hold a max of 14 so we can hold up to ISBN13s @@ -59,7 +58,7 @@ void do_ISBN_get(char* argv[]) void process_args(char* argv[]) { - if (strcmp(argv[1], "--help")) { + if (0 == strcmp(argv[1], "--help")) { printf("%s - An ISBN lookup tool.\n", argv[0]); printf("Author: Nathan Singer\n"); @@ -68,7 +67,7 @@ void process_args(char* argv[]) puts("--help - Shows this message."); puts("[isbn] -- Attempts to download a book from the given ISBN-10 or ISBN-13 input."); puts("remove [id] -- Removes a book with the given ID from the book database."); - } else if (strcmp(argv[1], "remove")) { + } else if (0 == strcmp(argv[1], "remove")) { // remove a book here return; } else {