Commit eeb5164061f1404b540f3567e4bd9605cef4dee3

Authored by Arnaud Blanchard
1 parent 28f7f9a5

manage 64 keys possible instead of 36

Showing 1 changed file with 6 additions and 2 deletions
... ... @@ -263,8 +263,12 @@ int main(int argc, char** argv){
keys_nb=strtod(key_nb_str, NULL);
key_list=MANY_ALLOCATIONS(keys_nb, char);
FOR(i, keys_nb){
if (i<10) key_list[i]=48+i;
else key_list[i]=97+i-10;
if (i<10) key_list[i]=48+i; //01234567890
else if (i<36) key_list[i]=97+i-10; //abc...xyz
else if (i<62) key_list[i]=65+i-36; //ABC...XYZ
else if (i==62) key_list[i]='[';
else if (i==63) key_list[i]=']';
else EXIT_ON_ERROR("Too many keys. You have '%d' max is 64", keys_nb);
}
}
else keys_nb=strlen(key_list);
... ...