Update 'cv7/a_station.c'

This commit is contained in:
Anzhelika Nikolaieva 2023-11-06 20:12:36 +00:00
parent 42366aaf34
commit 8959ee7231

View File

@ -25,12 +25,12 @@ void destroy_station(struct station* station){
} }
int select_track(struct station* station, const char* target){ int select_track(struct station* station, const char* target){
if (target[0] >= 'A' && target[0] <= 'Z') { if (isalpha(target[0])) {
if (isupper(target[0])) {
return target[0] - 'A'; return target[0] - 'A';
} else {
} else if (target[0] >= 'a' && target[0] <= 'z') {
return target[0] - 'a'; return target[0] - 'a';
}
} else { } else {
return 0; return 0;
} }