hgefjhehj
This commit is contained in:
parent
b6be23c5df
commit
7585891ae1
@ -56,7 +56,7 @@ void add_target_capacity(struct station* station,const char* target, int capacit
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (count == res && strcmp(ptr->value, target) != 0){
|
else if (count == res && ptr && strcmp(ptr->value, target) != 0){
|
||||||
struct car* next = (struct car*)calloc(1, sizeof(struct car));
|
struct car* next = (struct car*)calloc(1, sizeof(struct car));
|
||||||
strcpy(next->value, target);
|
strcpy(next->value, target);
|
||||||
next->capacity = capacity;
|
next->capacity = capacity;
|
||||||
@ -69,6 +69,9 @@ void add_target_capacity(struct station* station,const char* target, int capacit
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!ptr){
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
ptr->capacity += capacity;
|
ptr->capacity += capacity;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user