From 1cb87c3c0deb779402089197e8a554c63dbcd130 Mon Sep 17 00:00:00 2001 From: Anzhelika Nikolaieva Date: Mon, 6 Nov 2023 20:15:58 +0000 Subject: [PATCH] Update 'cv7/a_station.c' --- cv7/a_station.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cv7/a_station.c b/cv7/a_station.c index bbb7c51..cd1c8b6 100644 --- a/cv7/a_station.c +++ b/cv7/a_station.c @@ -25,14 +25,11 @@ void destroy_station(struct station* station){ } int select_track(struct station* station, const char* target){ - if (isalpha(target[0])) { - if (isupper(target[0])) { - return target[0] - 'A'; - } else { - return target[0] - 'a'; - } + if (isalpha(target[0])) { + char first_letter = tolower(target[0]); + return first_letter - 'a'; } else { - return 0; + return 0; } }