mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-20 17:26:30 +00:00
Autoconf failing when last line has no trailing LF (#23537)
This commit is contained in:
parent
004f1ec36a
commit
ea99e4724f
@ -37,6 +37,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Berry avoid json parsing for unmatched commands (#23494)
|
- Berry avoid json parsing for unmatched commands (#23494)
|
||||||
- Berry integer and real parser to handle overflows (#23495)
|
- Berry integer and real parser to handle overflows (#23495)
|
||||||
- Berry potential pointer underflow with `string.endswith` (#23496)
|
- Berry potential pointer underflow with `string.endswith` (#23496)
|
||||||
|
- Autoconf failing when last line has no trailing LF
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ char* be_fgets(void *hfile, void *buffer, int size)
|
|||||||
// Serial.printf("be_fgets size=%d ret=%d\n", size, ret);
|
// Serial.printf("be_fgets size=%d ret=%d\n", size, ret);
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
buf[ret] = 0; // add string terminator
|
buf[ret] = 0; // add string terminator
|
||||||
if (ret < size - 1) {
|
if ((ret != 0) && (ret < size - 1)) {
|
||||||
buf[ret] = '\n';
|
buf[ret] = '\n';
|
||||||
buf[ret+1] = 0;
|
buf[ret+1] = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user