Fixed small bug with seed generation
Signed-off-by: Bazsalanszky <bazs@makk.ml>
This commit is contained in:
parent
89fe652d21
commit
0247560a06
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ char* generateSeed(int len){
|
||||||
"ABCDEFGHJKLMNPQRSTUVWXYZ"
|
"ABCDEFGHJKLMNPQRSTUVWXYZ"
|
||||||
"abcdefghijkmnopqrstuvwxyz";
|
"abcdefghijkmnopqrstuvwxyz";
|
||||||
srand(time(0));
|
srand(time(0));
|
||||||
char *result = malloc(sizeof(char) * 512);
|
char *result = malloc(sizeof(char) * len+1);
|
||||||
for(int i = 0;i<len;i++){
|
for(int i = 0;i<len;i++){
|
||||||
result[i] = base58[rand() % 58];
|
result[i] = base58[rand() % 58];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue