mirror of https://github.com/arendst/Tasmota.git
Prevent crashing when `display.ini` is missing end `#` (#22471)
This commit is contained in:
parent
b195bcd88d
commit
dd99642cf7
|
@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Matter provisioning with matter.js controller (#22470)
|
- Matter provisioning with matter.js controller (#22470)
|
||||||
|
- Prevent crashing when `display.ini` is missing end `#`
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -680,14 +680,15 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
|
||||||
if (*lp == '\n' || *lp == ' ') { // Add space char
|
if (*lp == '\n' || *lp == ' ') { // Add space char
|
||||||
lp++;
|
lp++;
|
||||||
} else {
|
} else {
|
||||||
lp = strchr(lp, '\n');
|
char *lp1;
|
||||||
if (!lp) {
|
lp1 = strchr(lp, '\n');
|
||||||
lp = strchr(lp, ' ');
|
if (!lp1) {
|
||||||
if (!lp) {
|
lp1 = strchr(lp, ' ');
|
||||||
|
if (!lp1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lp++;
|
lp = lp1 + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue