diff --git a/include/flags.h b/include/flags.h index b6b090a..d3c17b2 100644 --- a/include/flags.h +++ b/include/flags.h @@ -31,7 +31,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 + unsigned char update; //BOOLEAN FOR UPDATING YOUR WHY VERSION IF OLD IS USED } inputFlags; typedef struct diff --git a/src/app/main.c b/src/app/main.c index c5f6e41..9b4f65b 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, 1}); + outputFlags encryptedText = encryptText(TEXT_TO_ENCRYPT, NULL, (inputFlags) {1, 1, 0}); //SIMPLE TEXT printf diff --git a/src/lib/flags.c b/src/lib/flags.c index ac98e25..7d35004 100644 --- a/src/lib/flags.c +++ b/src/lib/flags.c @@ -19,7 +19,7 @@ unsigned long getKeyLength() inputFlags defaultFlags() { - return (inputFlags) {0, 0, 1}; + return (inputFlags) { 0, 0, 0 }; } outputFlags noOutput(unsigned char exitCode) diff --git a/src/lib/misc.c b/src/lib/misc.c index 438edf0..bf81a25 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -145,7 +145,7 @@ unsigned char checkVersion(inputFlags flags) if (strcmp(VERSION, json_object_get_string(active)) != 0) { //UPDATE - if (!flags.noUpdate) + if (flags.update) { //CHECK FOR ROOT PERMISSIONS if (getuid() != 0) diff --git a/src/lib/test/main.c b/src/lib/test/main.c index 9c6cb94..c61aca4 100644 --- a/src/lib/test/main.c +++ b/src/lib/test/main.c @@ -17,7 +17,7 @@ int main(void) { 0, //SKIP CHECK 0, //NO OUTPUT - 1 //NO UPDATE + 0 //UPDATE }; //SET KEY_LENGTH TO 100