Skip to content

Commit

Permalink
fix crash with very long function arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
gemu2015 committed Dec 4, 2024
1 parent b2b62a1 commit 639b1d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2844,15 +2844,15 @@ char *isvar(char *lp, uint8_t *vtype, struct T_INDEX *tind, TS_FLOAT *fp, char *
}

const char *term="\n\r ])=+-/*%><!^&|}{";
for (count = 0; count < sizeof(vname); count++) {
for (count = 0; count < sizeof(vname) - 1; count++) {
char iob = lp[count];
if (!iob || strchr(term, iob)) {
vname[count] = 0;
break;
}
vname[count] = iob;
len += 1;
}
vname[count] = 0;

if (!vname[0]) {
// empty string
Expand Down

0 comments on commit 639b1d8

Please sign in to comment.