mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
fix empty line problem (#19171)
This commit is contained in:
parent
547169c57d
commit
994c105bda
@ -3807,6 +3807,13 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
|
|||||||
SCRIPT_SKIP_SPACES
|
SCRIPT_SKIP_SPACES
|
||||||
lp = GetNumericArgument(lp, OPER_EQU, &fvar, gv);
|
lp = GetNumericArgument(lp, OPER_EQU, &fvar, gv);
|
||||||
SCRIPT_SKIP_SPACES
|
SCRIPT_SKIP_SPACES
|
||||||
|
char delimc = 0;
|
||||||
|
if (*lp != ')') {
|
||||||
|
// get delimiter
|
||||||
|
delimc = *lp;
|
||||||
|
lp++;
|
||||||
|
}
|
||||||
|
|
||||||
char rstring[SCRIPT_MAXSSIZE];
|
char rstring[SCRIPT_MAXSSIZE];
|
||||||
rstring[0] = 0;
|
rstring[0] = 0;
|
||||||
int8_t index = fvar;
|
int8_t index = fvar;
|
||||||
@ -3857,6 +3864,12 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (delimc) {
|
||||||
|
char *xp = strchr(rstring, delimc);
|
||||||
|
if (xp) {
|
||||||
|
*xp = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
free(mqd);
|
free(mqd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6803,6 +6816,11 @@ startline:
|
|||||||
}
|
}
|
||||||
// skip empty line
|
// skip empty line
|
||||||
SCRIPT_SKIP_EOL
|
SCRIPT_SKIP_EOL
|
||||||
|
|
||||||
|
while (*lp == '\t' || *lp == ' ') {
|
||||||
|
lp++;
|
||||||
|
}
|
||||||
|
|
||||||
// skip comment
|
// skip comment
|
||||||
if (*lp == ';') goto next_line;
|
if (*lp == ';') goto next_line;
|
||||||
if (!*lp) break;
|
if (!*lp) break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user