Fix command FriendlyName when no index is given

Fix command FriendlyName newname when no index is given
This commit is contained in:
Theo Arends 2020-03-13 12:50:27 +01:00
parent ce8e68d118
commit d26ce074d8
1 changed files with 1 additions and 1 deletions

View File

@ -1342,7 +1342,7 @@ void CmndWifiConfig(void)
void CmndFriendlyname(void) void CmndFriendlyname(void)
{ {
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= MAX_FRIENDLYNAMES)) { if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= MAX_FRIENDLYNAMES)) {
if (!XdrvMailbox.usridx) { if (!XdrvMailbox.usridx && !XdrvMailbox.data_len) {
ResponseCmndAll(SET_FRIENDLYNAME1, MAX_FRIENDLYNAMES); ResponseCmndAll(SET_FRIENDLYNAME1, MAX_FRIENDLYNAMES);
} else { } else {
if (XdrvMailbox.data_len > 0) { if (XdrvMailbox.data_len > 0) {