From 840a5f8fb48398fdaf9c58c9bb6e7e88a2ca5b59 Mon Sep 17 00:00:00 2001 From: nooooooom Date: Fri, 24 Nov 2023 15:06:17 +0800 Subject: [PATCH] Fix code logic issues --- src/git/parsers/diffParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git/parsers/diffParser.ts b/src/git/parsers/diffParser.ts index e1e238c..4850aa8 100644 --- a/src/git/parsers/diffParser.ts +++ b/src/git/parsers/diffParser.ts @@ -23,8 +23,8 @@ export function parseGitFileDiff(data: string, includeContents = false): GitDiff // Skip header let i = -1; - while (i < lines.length) { - if (lines[++i].startsWith('@@')) { + while (++i < lines.length) { + if (lines[i].startsWith('@@')) { break; } }