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;
|
struct car* ptr = *station->tracks;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int res = select_track(station, target);
|
int res = select_track(station, target);
|
||||||
while(ptr && ptr->next){
|
while(ptr){
|
||||||
if(count == res){
|
if(count == res){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (strcmp(ptr->value, target) ==0 ){
|
if (strcmp(ptr->value, target) ==0 ){
|
||||||
ptr->capacity += capacity;
|
ptr->capacity += capacity;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user