Fixed small bug with seed generation

Signed-off-by: Bazsalanszky <bazs@makk.ml>
This commit is contained in:
Bazsalanszky 2019-10-16 14:01:15 +02:00
parent 89fe652d21
commit 0247560a06

View file

@ -12,7 +12,7 @@ char* generateSeed(int len){
"ABCDEFGHJKLMNPQRSTUVWXYZ"
"abcdefghijkmnopqrstuvwxyz";
srand(time(0));
char *result = malloc(sizeof(char) * 512);
char *result = malloc(sizeof(char) * len+1);
for(int i = 0;i<len;i++){
result[i] = base58[rand() % 58];
}