Fixing
This commit is contained in:
parent
db0919f6ba
commit
f7558fb7bf
@ -31,11 +31,11 @@ void add_target_capacity(struct station* station,const char* target, int capacit
|
||||
struct car* ptr = *station->tracks;
|
||||
int count = 0;
|
||||
int res = select_track(station, target);
|
||||
while(ptr && ptr->next){
|
||||
while(ptr){
|
||||
if(count == res){
|
||||
break;
|
||||
}
|
||||
else if (strcmp(ptr->value, target) ==0 ){
|
||||
if (strcmp(ptr->value, target) ==0 ){
|
||||
ptr->capacity += capacity;
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user