push
This commit is contained in:
parent
f54bbf8531
commit
dd425613b2
@ -25,7 +25,7 @@ void destroy_station(struct station* stanica){
|
|||||||
int select_track(struct station* stanica, const char* ciel){
|
int select_track(struct station* stanica, const char* ciel){
|
||||||
unsigned long heslo = 5381;
|
unsigned long heslo = 5381;
|
||||||
int znak;
|
int znak;
|
||||||
while ((znak == *ciel++)){
|
while ((znak = *ciel++)){
|
||||||
heslo = ((heslo << 5) + heslo) + znak;
|
heslo = ((heslo << 5) + heslo) + znak;
|
||||||
}
|
}
|
||||||
return heslo % stanica->track_count;
|
return heslo % stanica->track_count;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user