Update hex2hcd.c

This commit is contained in:
ZTG LXC 2021-02-26 18:19:33 +07:00 committed by GitHub
parent 817e2a7f29
commit b617769511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,8 +101,7 @@ int main(int argc, char *argv[])
int type; int type;
char obuf[7]; char obuf[7];
unsigned int dest_addr; unsigned int dest_addr;
while ((rbuf[len - 1] == '\r') || (rbuf[len - 1] == '\n')) while ((rbuf[len - 1] == '\r') || (rbuf[len - 1] == '\n')) len--;
len--;
printf("%d, %s\n", (int)len, rbuf); printf("%d, %s\n", (int)len, rbuf);
if (!check_hex_line(rbuf, len)) if (!check_hex_line(rbuf, len))
break; break;