1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00

bad feedback from copilot

This commit is contained in:
J. Nick Koston
2026-01-29 23:31:09 -06:00
parent 64e4edd70f
commit bb35e7b4b5

View File

@@ -29,8 +29,8 @@ class RealTimeClock : public PollingComponent {
/// Set the time zone from a character buffer with known length.
/// The buffer does not need to be null-terminated.
void set_timezone(const char *tz, size_t len) {
// Stack buffer - TZ strings are typically <64 chars
char buf[64];
// Stack buffer - TZ strings are typically short but allow up to 128
char buf[128];
if (len >= sizeof(buf))
len = sizeof(buf) - 1;
memcpy(buf, tz, len);