renamed noUpdate flag to update & swapped its value everywhere
it was kinda annoying when you were trying to disable it with positive value :DD
This commit is contained in:
parent
71865826fa
commit
212f0205c5
@ -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
|
||||
|
@ -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
|
||||
|
@ -19,7 +19,7 @@ unsigned long getKeyLength()
|
||||
|
||||
inputFlags defaultFlags()
|
||||
{
|
||||
return (inputFlags) {0, 0, 1};
|
||||
return (inputFlags) { 0, 0, 0 };
|
||||
}
|
||||
|
||||
outputFlags noOutput(unsigned char exitCode)
|
||||
|
@ -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)
|
||||
|
@ -17,7 +17,7 @@ int main(void)
|
||||
{
|
||||
0, //SKIP CHECK
|
||||
0, //NO OUTPUT
|
||||
1 //NO UPDATE
|
||||
0 //UPDATE
|
||||
};
|
||||
|
||||
//SET KEY_LENGTH TO 100
|
||||
|
Loading…
x
Reference in New Issue
Block a user