changed keyLength type from I to UL

This commit is contained in:
Václav Šmejkal 2022-05-29 17:45:34 +02:00
parent 1145eee844
commit e3790a2bff
3 changed files with 4 additions and 4 deletions

View File

@ -35,10 +35,10 @@ typedef struct
} outputFlags;
//VARIABLES
static int keyLength = 50; //LENGTH OF KEY > DO NOT TOUCH THIS <
static unsigned long keyLength = 50; //LENGTH OF KEY > DO NOT TOUCH THIS <
//GETTERS
int getKeyLength();
unsigned long getKeyLength();
inputFlags noFlags(); //THIS GENERATES inputFlags WITH DEFAULT VALUES
//SETTERS

View File

@ -1,6 +1,6 @@
#include <why2/flags.h>
int getKeyLength()
unsigned long getKeyLength()
{
return keyLength;
}

View File

@ -177,7 +177,7 @@ void checkKey(char *key, inputFlags flags)
{
if (strlen(key) < getKeyLength())
{
if (!flags.noOutput) fprintf(stderr, "Key must be at least %d characters long!\n", getKeyLength());
if (!flags.noOutput) fprintf(stderr, "Key must be at least %lu characters long!\n", getKeyLength());
exit(INVALID_KEY);
}
}