version 1.42, 2003/04/06 21:07:38 |
version 1.43, 2003/04/07 21:13:54 |
|
|
if (l > 0) { |
if (l > 0) { |
lastc = skey.seed[l - 1]; |
lastc = skey.seed[l - 1]; |
if (isdigit(lastc) && lastc != '9') { |
if (isdigit(lastc) && lastc != '9') { |
(void)strcpy(seed, skey.seed); |
(void)strlcpy(seed, skey.seed, |
|
sizeof seed); |
seed[l - 1] = lastc + 1; |
seed[l - 1] = lastc + 1; |
} |
} |
if (isdigit(lastc) && lastc == '9' && l < 16) { |
if (isdigit(lastc) && lastc == '9' && l < 16) { |
(void)strcpy(seed, skey.seed); |
(void)strlcpy(seed, skey.seed, |
|
sizeof seed); |
seed[l - 1] = '0'; |
seed[l - 1] = '0'; |
seed[l] = '0'; |
seed[l] = '0'; |
seed[l + 1] = '\0'; |
seed[l + 1] = '\0'; |
|
|
break; /* Valid seed */ |
break; /* Valid seed */ |
} |
} |
if (newseed[0] != '\0') |
if (newseed[0] != '\0') |
(void)strcpy(seed, newseed); |
(void)strlcpy(seed, newseed, sizeof seed); |
|
|
for (i = 0; ; i++) { |
for (i = 0; ; i++) { |
if (i >= 2) |
if (i >= 2) |