mirror of
https://github.com/esphome/esphome.git
synced 2025-10-07 12:23:47 +01:00
handle >999
This commit is contained in:
@@ -356,8 +356,7 @@ class Logger : public Component {
|
|||||||
copy_string(buffer, pos, tag);
|
copy_string(buffer, pos, tag);
|
||||||
buffer[pos++] = ':';
|
buffer[pos++] = ':';
|
||||||
// Format line number without modulo operations (passed by value, safe to mutate)
|
// Format line number without modulo operations (passed by value, safe to mutate)
|
||||||
if [[unlikely]]
|
if (line > 999) [[unlikely]] {
|
||||||
(line > 999) {
|
|
||||||
int thousands = line / 1000;
|
int thousands = line / 1000;
|
||||||
buffer[pos++] = '0' + thousands;
|
buffer[pos++] = '0' + thousands;
|
||||||
line -= thousands * 1000;
|
line -= thousands * 1000;
|
||||||
|
Reference in New Issue
Block a user