]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
Merge pull request #558 from pwpiwi/fix_alignment
[proxmark3-svn] / client / cmdhfmf.c
index d0320148bf1ddec43d511c6787e7a4fe52b6f792..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
                        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
                                } else {                                        // 16 block sector\r
-                                       sectortrailer = (trgBlockNo & 0x0f) + 15;\r
+                                       sectortrailer = trgBlockNo | 0x0f;\r
                                }\r
                                mfEmlGetMem(keyBlock, sectortrailer, 1);\r
 \r
                                }\r
                                mfEmlGetMem(keyBlock, sectortrailer, 1);\r
 \r
@@ -1685,10 +1685,7 @@ int CmdHF14AMfESet(const char *Cmd)
        }\r
 \r
        //  1 - blocks count\r
        }\r
 \r
        //  1 - blocks count\r
-       UsbCommand c = {CMD_MIFARE_EML_MEMSET, {blockNo, 1, 0}};\r
-       memcpy(c.d.asBytes, memBlock, 16);\r
-       SendCommand(&c);\r
-       return 0;\r
+       return mfEmlSetMem(memBlock, blockNo, 1);\r
 }\r
 \r
 \r
 }\r
 \r
 \r
Impressum, Datenschutz