fix trx pin error (#22119)

This commit is contained in:
gemu 2024-09-10 14:48:38 +02:00 committed by GitHub
parent 2d522485c4
commit 1c730aab86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -3246,14 +3246,15 @@ dddef_exit:
mmp->params = strtol(lp1, &lp1, 10); mmp->params = strtol(lp1, &lp1, 10);
if (*lp1 != ',') goto next_line; if (*lp1 != ',') goto next_line;
lp1++; lp1++;
mmp->prefix[SML_PREFIX_SIZE - 1] = 0;
for (uint32_t cnt = 0; cnt < SML_PREFIX_SIZE; cnt++) { for (uint32_t cnt = 0; cnt < SML_PREFIX_SIZE; cnt++) {
if (*lp1 == SCRIPT_EOL || *lp1 == ',') { if (!*lp1 || *lp1 == SCRIPT_EOL || *lp1 == ',') {
mmp->prefix[cnt] = 0; mmp->prefix[cnt] = 0;
break; break;
} }
mmp->prefix[cnt] = *lp1++; mmp->prefix[cnt] = *lp1++;
} }
mmp->prefix[SML_PREFIX_SIZE - 1] = 0;
if (*lp1 == ',') { if (*lp1 == ',') {
lp1++; lp1++;
// get TRX pin // get TRX pin