]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmddata.c
biphase bug fixes
[proxmark3-svn] / client / cmddata.c
index 0bd8a7a9e8070832ccc57f196783775ecae375e3..e6e4dc0a0f8c4f2cb485433962f35dfe8144baa3 100644 (file)
@@ -520,6 +520,7 @@ int CmdBiphaseDecodeRaw(const char *Cmd)
        PrintAndLog("Biphase Decoded using offset: %d - # errors:%d - data:",offset,errCnt);
        printBitStream(BitStream, size);
        PrintAndLog("\nif bitstream does not look right try offset=1");
+  if (offset == 1) setDemodBuf(DemodBuffer,DemodBufferLen-1,1);  //remove first bit from raw demod
        return 1;
 }
 
@@ -534,7 +535,7 @@ void setBiphaseDemodBuf(uint8_t *BitStream, size_t size)
     return;
   }
   for (size_t idx=0; idx<size; idx++){
-    if(BitStream[idx]){
+    if(!BitStream[idx]){
       rawStream[i++] = curPhase;
       rawStream[i++] = curPhase;
       curPhase ^= 1; 
Impressum, Datenschutz