added missing flags implementation

This commit is contained in:
Václav Šmejkal 2022-05-08 19:41:20 +02:00
parent 5c45e2c5b5
commit efab8647a8
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ outputFlags decryptText(char *text, char *key, inputFlags flags)
//CHECK FOR INVALID key
if (strlen(key) < getKeyLength())
{
fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength());
if (!flags.noOutput) fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength());
exit(INVALID_KEY);
}

View File

@ -27,7 +27,7 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags)
{
if (strlen(keyNew) < getKeyLength())
{
fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength());
if (!flags.noOutput) fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength());
exit(INVALID_KEY);
}