]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/lfdemod.c
FIX: 'data print' - now don't crash the client when demodbuffer is empty
[proxmark3-svn] / common / lfdemod.c
index 4613270383ed737511d525e739f5da7692579588..b45a4097a6d536cc29c97327482366fb50ae8cce 100644 (file)
@@ -602,10 +602,11 @@ int HIDdemodFSK(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32
                *hi2 = (*hi2<<1)|(*hi>>31);
                *hi = (*hi<<1)|(*lo>>31);
                //Then, shift in a 0 or one into low
+               *lo <<= 1;
                if (dest[idx] && !dest[idx+1])  // 1 0
-                       *lo=(*lo<<1)|1;
+                       *lo |= 1;
                else // 0 1
-                       *lo=(*lo<<1)|0;
+                       *lo |= 0;
        }
        return (int)startIdx;
 }
Impressum, Datenschutz