]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/appmain.c
Merge branch 'master' of https://github.com/Proxmark/proxmark3
[proxmark3-svn] / armsrc / appmain.c
index 8f676c8e4acd65fe8af59a20b7cad44793f98292..05e688682b6b8fadf7a4bf504cc43bb0a407de8b 100644 (file)
@@ -36,7 +36,8 @@
 // is the order in which they go out on the wire.
 //=============================================================================
 
-uint8_t ToSend[512];
+#define TOSEND_BUFFER_SIZE (9*MAX_FRAME_SIZE + 1 + 1 + 2)  // 8 data bits and 1 parity bit per payload byte, 1 correction bit, 1 SOC bit, 2 EOC bits 
+uint8_t ToSend[TOSEND_BUFFER_SIZE];
 int ToSendMax;
 static int ToSendBit;
 struct common_area common_area __attribute__((section(".commonarea")));
@@ -67,7 +68,7 @@ void ToSendStuffBit(int b)
 
        ToSendBit++;
 
-       if(ToSendBit >= sizeof(ToSend)) {
+       if(ToSendMax >= sizeof(ToSend)) {
                ToSendBit = 0;
                DbpString("ToSendStuffBit overflowed!");
        }
Impressum, Datenschutz