From f291773d5cda01d8511480d54bef2ba2ae3a9807 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 20 Feb 2026 00:10:14 -0600 Subject: [PATCH] [core] Remove unnecessary input contract comment base64_find_char() safely handles any input including 0, returning 0 via strchr fallback - no special contract needed. Co-Authored-By: Claude Opus 4.6 --- esphome/core/helpers.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/esphome/core/helpers.cpp b/esphome/core/helpers.cpp index 46e6a5564c..5452f715f9 100644 --- a/esphome/core/helpers.cpp +++ b/esphome/core/helpers.cpp @@ -590,7 +590,6 @@ size_t base64_decode(const std::string &encoded_string, uint8_t *buf, size_t buf } // Decode 4 base64 characters to up to 'count' output bytes, returns true if truncated. -// char_array_4 entries must be valid base64/base64url characters or 0 (zero-padding from tail). static inline bool base64_decode_quad_(uint8_t *char_array_4, int count, uint8_t *buf, size_t buf_len, size_t &out) { for (int i = 0; i < 4; i++) char_array_4[i] = base64_find_char(char_array_4[i]);