forgot to add a subtraction in length of the node
This commit is contained in:
parent
351db3f366
commit
755f16877d
|
@ -81,6 +81,7 @@ void q_add_node(Q* q, QNode* node) {
|
|||
void q_remove_node(Q* q) {
|
||||
QNode* n = q->head;
|
||||
q->head = n->next;
|
||||
q->length--;
|
||||
free(n);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue