diff --git a/src/lib/misc.c b/src/lib/misc.c index b89979f..1f3699c 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -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;