Skip to content

Commit

Permalink
Fix missing check for 0 in craft replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
TeTpaAka authored and est31 committed Jul 4, 2015
1 parent 7b171ea commit 87b9cda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/craftdef.cpp
Expand Up @@ -235,8 +235,8 @@ static void craftDecrementOrReplaceInput(CraftInput &input,
}
}
}
// No replacement was found, simply decrement count to zero
if (!found_replacement)
// No replacement was found, simply decrement count by one
if (!found_replacement && it->count > 0)
it->remove(1);
}
}
Expand Down

0 comments on commit 87b9cda

Please sign in to comment.