From 50d8cdbf3b5839602d88776a4b19f1ca60c772a2 Mon Sep 17 00:00:00 2001 From: wu58430 Date: Wed, 10 Jan 2024 23:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E9=81=93=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.c b/settings.c index bc1a767..becb2c6 100644 --- a/settings.c +++ b/settings.c @@ -693,7 +693,7 @@ void SETTINGS_SaveChannelName(uint8_t channel, const char * name) { uint16_t offset = channel * 16; uint8_t buf[16] = {0}; - memcpy(buf, name, MIN(strlen(name), 10u)); + memcpy(buf, name, MIN(strlen(name), MAX_EDIT_INDEX)); EEPROM_WriteBuffer(0x0F50 + offset, buf,8); EEPROM_WriteBuffer(0x0F58 + offset, buf + 8,8); }