mirror of
https://github.com/esphome/esphome.git
synced 2026-02-06 01:22:47 +08:00
Merge remote-tracking branch 'origin/no_intermed_buffers_api_vv' into integration
This commit is contained in:
@@ -408,7 +408,11 @@ class DumpBuffer {
|
||||
size_t pos() const { return pos_; }
|
||||
/// Update position after buf_append_printf call
|
||||
void set_pos(size_t pos) {
|
||||
pos_ = pos;
|
||||
if (pos >= CAPACITY) {
|
||||
pos_ = CAPACITY - 1;
|
||||
} else {
|
||||
pos_ = pos;
|
||||
}
|
||||
buf_[pos_] = '\0';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user