Explorar o código

wrong datatype caused crc check to fail almost every time

Simon Fischer %!s(int64=2) %!d(string=hai) anos
pai
achega
3d66471af4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/shellmatta_ymodem.c

+ 1 - 1
src/shellmatta_ymodem.c

@@ -371,7 +371,7 @@ shellmatta_ymodem_rcv_retcode_t shellmatta_ymodem_receive_byte(shellmatta_handle
 */
 void shellmatta_ymodem_check_packet(shellmatta_handle_t handle)
 {
-    uint8_t computedCrc = 0u;
+    uint16_t computedCrc = 0u;
     if (shellmatta_ymodem_packet.packetNumber != (0xFF - shellmatta_ymodem_packet.reversePacketNumber))
     {
         shellmatta_ymodem_nak(handle);