From 5511210d8926d7a1ae14624d9ab7c0b4fcfcf107 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 8 Jun 2022 19:25:54 +0200 Subject: [PATCH] added missing flags to inputFlags constructors --- include/flags.h | 1 + src/app/main.c | 2 +- src/lib/flags.c | 2 +- src/lib/test/main.c | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/flags.h b/include/flags.h index fddea95..21fdb57 100644 --- a/include/flags.h +++ b/include/flags.h @@ -26,6 +26,7 @@ typedef struct { unsigned char noCheck; //BOOLEAN FOR SKIPPING VERSION CHECK unsigned char noOutput; //BOOLEAN FOR NOT PRINTING OUTPUT WHEN ENCRYPTING/DECRYPTING + unsigned char noUpdate; //BOOLEAN FOR NOT UPDATING YOUR WHY VERSION IF OLD IS USED } inputFlags; typedef struct diff --git a/src/app/main.c b/src/app/main.c index b740328..c5f6e41 100644 --- a/src/app/main.c +++ b/src/app/main.c @@ -5,7 +5,7 @@ int main(void) { //RUN ENCRYPTION WITH TEXT_TO_ENCRYPT, GENERATE NEW KEY AND DO NOT CHECK FOR ACTIVE VERSION & PREVENT ANY OUTPUT - outputFlags encryptedText = encryptText(TEXT_TO_ENCRYPT, NULL, (inputFlags) {1, 1}); + outputFlags encryptedText = encryptText(TEXT_TO_ENCRYPT, NULL, (inputFlags) {1, 1, 1}); //SIMPLE TEXT printf diff --git a/src/lib/flags.c b/src/lib/flags.c index 09c2c8c..04af564 100644 --- a/src/lib/flags.c +++ b/src/lib/flags.c @@ -7,7 +7,7 @@ unsigned long getKeyLength() inputFlags noFlags() { - return (inputFlags) {0, 0}; + return (inputFlags) {0, 0, 0}; } void setKeyLength(int keyLengthNew) diff --git a/src/lib/test/main.c b/src/lib/test/main.c index d082d69..813d67b 100644 --- a/src/lib/test/main.c +++ b/src/lib/test/main.c @@ -17,6 +17,7 @@ int main(void) { 0, //SKIP CHECK 0, //NO OUTPUT + 0 //NO UPDATE }; //SET KEY_LENGTH TO 100