Sfoglia il codice sorgente

Update ry_sy.c

修改了读取不到文件大小,导致的文件传输的问题,问题说明在
https://www.rt-thread.org/qa/forum.php?mod=viewthread&tid=423781
Chinese66 5 anni fa
parent
commit
2822ec377d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      components/utilities/ymodem/ry_sy.c

+ 1 - 1
components/utilities/ymodem/ry_sy.c

@@ -40,7 +40,7 @@ static enum rym_code _rym_recv_begin(
         rt_kprintf("error creating file: %d\n", err);
         return RYM_CODE_CAN;
     }
-    cctx->flen = atoi((const char *)buf + rt_strnlen((const char *)buf, len - 1));
+    cctx->flen = atoi(1 + (const char *)buf + rt_strnlen((const char *)buf, len - 1));
     if (cctx->flen == 0)
         cctx->flen = -1;