Allow writes up to 256 bytes with mfdes writedata

And change help text to say 256 instead of 0xFFFF.

Closes #977
This commit is contained in:
Ave 2020-09-27 19:40:13 +03:00
commit 9c5c00d620
No known key found for this signature in database
GPG key ID: 398DD7BD03276F6D
2 changed files with 4 additions and 4 deletions

View file

@ -152,7 +152,7 @@ int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
*datalen = 0;
int ibuf = 0;
uint8_t tmp_buf[256] = {0};
uint8_t tmp_buf[512] = {0};
int res = CLIParamStrToBuf(argstr, tmp_buf, maxdatalen * 2, &ibuf); // *2 because here HEX
if (res) {
printf("Parameter error: buffer overflow.\n");
@ -186,7 +186,7 @@ int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int
if (!argstr->count)
return 0;
uint8_t tmp_buf[256] = {0};
uint8_t tmp_buf[512] = {0};
int ibuf = 0;
for (int i = 0; i < argstr->count; i++) {