mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 12:24:11 +00:00
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:
parent
934fa904e9
commit
8320001db7
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user