X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/92d255d3dc8fb9e567f3db035918249e6d083c35..bf8328e92802fd5f2b63a038ac0b3fc0eeac8581:/client/loclass/ikeys.c diff --git a/client/loclass/ikeys.c b/client/loclass/ikeys.c index cd2b72ee..4749181e 100644 --- a/client/loclass/ikeys.c +++ b/client/loclass/ikeys.c @@ -727,13 +727,17 @@ int readKeyFile(uint8_t key[8]) { FILE *f; - + int retval = 1; f = fopen("iclass_key.bin", "rb"); if (f) { - if(fread(key, sizeof(key), 1, f) == 1) return 0; + if(fread(key, sizeof(uint8_t), 8, f) == 1) + { + retval = 0; + } + fclose(f); } - return 1; + return retval; }