diff --git a/du6/a_station.c b/du6/a_station.c index c3b73f8..b6369a7 100644 --- a/du6/a_station.c +++ b/du6/a_station.c @@ -49,7 +49,9 @@ int select_track(struct station* station, const char* target) hash_value = (hash_value * 33) + target[i]; i++; } - return 0; + unsigned long index = hash_value % station->track_count; + + return index; } void add_target_capacity(struct station* station,const char* target, int capacity)