feat(ex02): fixed charset check

This commit is contained in:
Maix0 2026-04-24 14:08:46 +02:00
parent bacfb97ae0
commit 13c26268c8

View file

@ -277,8 +277,8 @@ bool parse_command(char* str, command* cmd) {
return true;
}
for (uint8_t k = 0; c[k]; k++) {
if (!(k >= 'a' && k <= 'z') && !(k >= 'A' && k <= 'Z') && !(k >= '0' && k <= '9') &&
k != '_' && k != '-') {
if (ft_stridx("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_",
c[k]) == 255) {
uart_sendstring(
"Invalid format: SET_TAG parameter must be alphanumeric (- and _ are allowed "
"too)"