Skip to content

Commit 87b9cda

Browse files
TeTpaAkaest31
authored andcommittedJul 4, 2015
Fix missing check for 0 in craft replacements
1 parent 7b171ea commit 87b9cda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎src/craftdef.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ static void craftDecrementOrReplaceInput(CraftInput &input,
235235
}
236236
}
237237
}
238-
// No replacement was found, simply decrement count to zero
239-
if (!found_replacement)
238+
// No replacement was found, simply decrement count by one
239+
if (!found_replacement && it->count > 0)
240240
it->remove(1);
241241
}
242242
}

0 commit comments

Comments
 (0)
Please sign in to comment.