Browse Source

Fix minor possible issue

gingerBill 7 years ago
parent
commit
e0549df03e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/checker.cpp

+ 1 - 1
src/checker.cpp

@@ -3092,7 +3092,7 @@ void calculate_global_init_order(Checker *c) {
 
 		for_array(i, n->pred.entries) {
 			EntityGraphNode *p = n->pred.entries[i].ptr;
-			p->dep_count -= 1;
+			p->dep_count -= gb_max(p->dep_count-1, 0);
 			priority_queue_fix(&pq, p->index);
 		}