diff options
Diffstat (limited to 'src/patch_parse.c')
| -rw-r--r-- | src/patch_parse.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/patch_parse.c b/src/patch_parse.c index 545f1ca9e..d7311157f 100644 --- a/src/patch_parse.c +++ b/src/patch_parse.c @@ -328,7 +328,8 @@ static int parse_header_start(git_patch_parsed *patch, git_patch_parse_ctx *ctx) * proceeed here. We then hope for the "---" and "+++" lines to fix that * for us. */ - if (!git_parse_ctx_contains(&ctx->parse_ctx, "\n", 1)) { + if (!git_parse_ctx_contains(&ctx->parse_ctx, "\n", 1) && + !git_parse_ctx_contains(&ctx->parse_ctx, "\r\n", 2)) { git_parse_advance_chars(&ctx->parse_ctx, ctx->parse_ctx.line_len - 1); git__free(patch->header_old_path); |
