Commit 9ff07c24 by Carlos Martín Nieto

buf test: make sure we always set the bom variable

parent f684970a
...@@ -114,6 +114,7 @@ int git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset) ...@@ -114,6 +114,7 @@ int git_buf_text_detect_bom(git_bom_t *bom, const git_buf *buf, size_t offset)
const char *ptr; const char *ptr;
size_t len; size_t len;
*bom = GIT_BOM_NONE;
/* need at least 2 bytes after offset to look for any BOM */ /* need at least 2 bytes after offset to look for any BOM */
if (buf->size < offset + 2) if (buf->size < offset + 2)
return 0; return 0;
......
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