]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
hf mf nested: use bitwise or instead. (#556)
authorArnie97 <arnie97@gmail.com>
Thu, 1 Feb 2018 07:09:14 +0000 (15:09 +0800)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Thu, 1 Feb 2018 07:09:14 +0000 (08:09 +0100)
client/cmdhfmf.c

index dbb6d092f5f49b2fabf9202b5550847cffd7af98..f5d7a5bef1356227dec72fb5f778c344eaaabcca 100644 (file)
@@ -683,9 +683,9 @@ int CmdHF14AMfNested(const char *Cmd)
                        if (transferToEml) {\r
                                uint8_t sectortrailer;\r
                                if (trgBlockNo < 32*4) {        // 4 block sector\r
-                                       sectortrailer = (trgBlockNo & ~0x03) + 3;\r
+                                       sectortrailer = trgBlockNo | 0x03;\r
                                } else {                                        // 16 block sector\r
-                                       sectortrailer = (trgBlockNo & ~0x0f) + 15;\r
+                                       sectortrailer = trgBlockNo | 0x0f;\r
                                }\r
                                mfEmlGetMem(keyBlock, sectortrailer, 1);\r
 \r
Impressum, Datenschutz