rule_dup fix

master
Daniel Kolesa 2015-12-27 18:20:47 +01:00
parent c21d6dc054
commit 31e19a5ba4
1 changed files with 3 additions and 1 deletions

View File

@ -455,8 +455,10 @@ struct ObState: CsState {
bool inherit_deps) {
Rule *oldr = nullptr;
for (auto &rule: rules.iter())
if (ptgt == rule.target)
if (ptgt == rule.target) {
oldr = &rule;
break;
}
if (!oldr)
return;
Rule &r = rules.push();