Fix patch num hunk without patch.ptr

This commit is contained in:
André R. de Miranda 2023-01-30 10:08:25 -03:00
parent 83584f0fef
commit f1ece8650b
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ func (patch *Patch) NumHunks() (int, error) {
if patch.ptr == nil {
return -1, ErrInvalid
}
ret := int(C.git_patch_num_hunks())
ret := int(C.git_patch_num_hunks(patch.ptr))
runtime.KeepAlive(patch)
return ret, nil
}