]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/lfops.c
wrong letter in variable name
[proxmark3-svn] / armsrc / lfops.c
index 31ee63588155de129d640ab12b952385288d3773..7b6fa97a71d51d73231d8251d8b9ff04b5c07be2 100644 (file)
@@ -633,8 +633,8 @@ void CmdHIDsimTAG(int hi, int lo, int ledcontrol)
 void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol)
 {
     uint8_t *dest = BigBuf_get_addr();
-
-    size_t size = BigBuf_max_traceLen()
+    const size_t sizeOfBigBuff = BigBuf_max_traceLen();
+    size_t size = 0
     uint32_t hi2=0, hi=0, lo=0;
     int idx=0;
     // Configure to go in 125Khz listen mode
@@ -647,6 +647,7 @@ void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol)
 
         DoAcquisition125k_internal(-1,true);
         // FSK demodulator
+        size = sizeOfBigBuff;  //variable size will change after demod so re initialize it before use
                idx = HIDdemodFSK(dest, &size, &hi2, &hi, &lo);
         
                if (idx>0 && lo>0){
@@ -705,6 +706,8 @@ void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol)
             }
             if (findone){
                 if (ledcontrol)        LED_A_OFF();
+                *high = hi;
+                *low = lo;
                 return;
             }
             // reset
@@ -752,6 +755,8 @@ void CmdEM410xdemod(int findone, int *high, int *low, int ledcontrol)
             }
             if (findone){
                 if (ledcontrol)        LED_A_OFF();
+                *high=lo>>32;
+                *low=lo & 0xFFFFFFFF;
                 return;
             }
         } else{
@@ -818,6 +823,8 @@ void CmdIOdemodFSK(int findone, int *high, int *low, int ledcontrol)
             if (findone){
                 if (ledcontrol)        LED_A_OFF();
                 //LED_A_OFF();
+                *high=code;
+                *low=code2;
                 return;
             }
             code=code2=0;
Impressum, Datenschutz