X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/92d255d3dc8fb9e567f3db035918249e6d083c35..f164662363901292b83d452b107a4f630473144a:/client/loclass/ikeys.c diff --git a/client/loclass/ikeys.c b/client/loclass/ikeys.c index cd2b72ee..f7115b19 100644 --- a/client/loclass/ikeys.c +++ b/client/loclass/ikeys.c @@ -725,16 +725,18 @@ int doTestsWithKnownInputs() 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; }