use strtoll() function in order to retrieve 64bits wide value. (Fixes Issue 55)

This commit is contained in:
Romuald Conty 2011-02-02 10:46:16 +00:00
parent af8ec581be
commit 6a3977545e

View file

@ -126,7 +126,7 @@ int main(int argc, char * const argv[]) {
exit(1); exit(1);
} else { } else {
bzero(defKey, 6); bzero(defKey, 6);
num_to_bytes(strtol(optarg, NULL, 16), 6, defKey); num_to_bytes(strtoll(optarg, NULL, 16), 6, defKey);
memcpy(defaultKeys[0], defKey, 6); memcpy(defaultKeys[0], defKey, 6);
} }
fprintf(stdout, "The custom key 0x%012llx has been added to the default keys\n", bytes_to_num(defKey, 6)); fprintf(stdout, "The custom key 0x%012llx has been added to the default keys\n", bytes_to_num(defKey, 6));