From 8320001db7b2981ba8a4c09a9c7f3da574953602 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Sat, 17 Sep 2011 16:07:28 +0200 Subject: [PATCH] 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. --- tests/t18-status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }