diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2011-09-17 16:07:28 +0200 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2011-09-17 16:07:28 +0200 |
| commit | 8320001db7b2981ba8a4c09a9c7f3da574953602 (patch) | |
| tree | fdcb95fce233f100e58ea6247f1076560990d975 /tests/t18-status.c | |
| parent | 934fa904e949a9e33dcb017fb73c0e3db22c3f3d (diff) | |
| download | libgit2-8320001db7b2981ba8a4c09a9c7f3da574953602.tar.gz | |
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.
Diffstat (limited to 'tests/t18-status.c')
| -rw-r--r-- | tests/t18-status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/t18-status.c b/tests/t18-status.c index 19951117e..75cdca1b7 100644 --- a/tests/t18-status.c +++ b/tests/t18-status.c @@ -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; - if (counts->entry_count > counts->expected_entry_count) { + if (counts->entry_count >= counts->expected_entry_count) { counts->wrong_status_flags_count++; goto exit; } |
