From a1df27937478da1db2e0b5f2465b1f465f25466e Mon Sep 17 00:00:00 2001 From: SuperNovaa41 Date: Sun, 14 Jan 2024 21:43:59 -0500 Subject: [PATCH] changes snprintf to memcpy, as it should be --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index d599c56..9d5354d 100644 --- a/src/main.c +++ b/src/main.c @@ -85,10 +85,10 @@ int main(int argc, char* argv[]) curl_global_init(CURL_GLOBAL_ALL); // Grab the ISBN from argv - snprintf(isbn_buf, 14, "%s", argv[1]); + memcpy(isbn_buf, argv[1], 14); // Grab the formatting options from argv - snprintf(options, 2, "%s", argv[2]); + memcpy(options, argv[2], 2); switch(options[0]) { case 'w': output_type = WRITE_TO_FILE;