mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 09:54:19 -07:00
[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 <noreply@anthropic.com>
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user