changed keyLength type from I to UL
This commit is contained in:
parent
1145eee844
commit
e3790a2bff
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <why2/flags.h>
|
||||
|
||||
int getKeyLength()
|
||||
unsigned long getKeyLength()
|
||||
{
|
||||
return keyLength;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user