X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/e6ee6c4cd135c29fcd3812e0ceea8fe17497700d..55eaed8f2ad26b9db249e2259c13444c38906795:/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; }