fixed address changing

This commit is contained in:
Edward Emelianov
2025-09-22 20:34:14 +03:00
parent dc2897e783
commit c29508df6c
3 changed files with 33 additions and 5 deletions

View File

@@ -77,8 +77,16 @@ TRUE_INLINE const char *chhwaddr(const char *buf){
uint32_t a;
if(buf && *buf){
const char *nxt = getnum(buf, &a);
if(nxt && nxt != buf) if(!mlx_sethwaddr(a)) return ERR;
} else return ERR;
if(nxt && nxt != buf){
if(!mlx_sethwaddr(a)) return ERR;
}else{
USND("Wrong number");
return ERR;
}
}else{
USND("Need address");
return ERR;
}
return OK;
}