Merge pull request #3437 from Chinese66/patch-1

Update ry_sy.c
This commit is contained in:
Bernard Xiong 2020-03-13 18:09:43 +08:00 committed by GitHub
commit d33d9dd9a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ static enum rym_code _rym_recv_begin(
rt_kprintf("error creating file: %d\n", err); rt_kprintf("error creating file: %d\n", err);
return RYM_CODE_CAN; 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) if (cctx->flen == 0)
cctx->flen = -1; cctx->flen = -1;