Commit 8320001d by nulltoken

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.
parent 934fa904
...@@ -113,7 +113,7 @@ static int status_cb(const char *path, unsigned int status_flags, void *payload) ...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment