mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 15:10:02 +00:00
buf: Is this the function you were looking for?
This commit is contained in:
parent
3874f2d54f
commit
355dddbf08
@ -111,7 +111,7 @@ bool git_buf_text_is_binary(const git_buf *buf)
|
||||
|
||||
bool git_buf_text_contains_nul(const git_buf *buf)
|
||||
{
|
||||
return (strnlen(buf->ptr, buf->size) != buf->size);
|
||||
return (memchr(buf->ptr, '\0', buf->size) != NULL);
|
||||
}
|
||||
|
||||
int git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset)
|
||||
|
Loading…
Reference in New Issue
Block a user