diff --git a/patch.go b/patch.go index 75e843c..7e6f71d 100644 --- a/patch.go +++ b/patch.go @@ -69,7 +69,7 @@ func (v *Repository) PatchFromBuffers(oldPath, newPath string, oldBuf, newBuf [] var patchPtr *C.git_patch oldPtr := toPointer(oldBuf) - newPtr := (*C.char)(toPointer(newBuf)) + newPtr := toPointer(newBuf) cOldPath := C.CString(oldPath) defer C.free(unsafe.Pointer(cOldPath))