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){ @@ -263,8 +263,12 @@ int main(int argc, char** argv){
263 keys_nb=strtod(key_nb_str, NULL); 263 keys_nb=strtod(key_nb_str, NULL);
264 key_list=MANY_ALLOCATIONS(keys_nb, char); 264 key_list=MANY_ALLOCATIONS(keys_nb, char);
265 FOR(i, keys_nb){ 265 FOR(i, keys_nb){
266 - if (i<10) key_list[i]=48+i;  
267 - else key_list[i]=97+i-10; 266 + if (i<10) key_list[i]=48+i; //01234567890
  267 + else if (i<36) key_list[i]=97+i-10; //abc...xyz
  268 + else if (i<62) key_list[i]=65+i-36; //ABC...XYZ
  269 + else if (i==62) key_list[i]='[';
  270 + else if (i==63) key_list[i]=']';
  271 + else EXIT_ON_ERROR("Too many keys. You have '%d' max is 64", keys_nb);
268 } 272 }
269 } 273 }
270 else keys_nb=strlen(key_list); 274 else keys_nb=strlen(key_list);