fixed countRepeatedKeySize result
I forgot that the key has to be 2x longer than text TEXT = Hi, KEY = abcd
This commit is contained in:
parent
3421fb5b70
commit
916c670e4b
@ -355,9 +355,9 @@ unsigned long countRepeatedKeySize(char *text, char *key)
|
||||
{
|
||||
unsigned long returning = 0;
|
||||
|
||||
if (strlen(key) < strlen(text))
|
||||
if (strlen(key) < 2 * strlen(text))
|
||||
{
|
||||
returning = strlen(text) - strlen(key);
|
||||
returning = 2 * strlen(text) - strlen(key);
|
||||
}
|
||||
|
||||
return returning;
|
||||
|
Loading…
x
Reference in New Issue
Block a user