Fix a off-by-one error in the git_status_foreach tests

Provided the tests fail (which they should not) and the callback is invoked too many times, this prevents the tests from segfaulting.
This commit is contained in:
nulltoken 2011-09-17 16:07:28 +02:00
parent 934fa904e9
commit 8320001db7

View File

@ -113,7 +113,7 @@ static int status_cb(const char *path, unsigned int status_flags, void *payload)
{ {
struct status_entry_counts *counts = (struct status_entry_counts *)payload; struct status_entry_counts *counts = (struct status_entry_counts *)payload;
if (counts->entry_count > counts->expected_entry_count) { if (counts->entry_count >= counts->expected_entry_count) {
counts->wrong_status_flags_count++; counts->wrong_status_flags_count++;
goto exit; goto exit;
} }