From 56971f6b3be4e0e657dd20738bdaeb673ae267ff Mon Sep 17 00:00:00 2001 From: Ofek Shilon Date: Sat, 20 Sep 2025 21:57:26 +0300 Subject: [PATCH] Copilot CR fixes --- lib/cfg/cfg-parsers/gcc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cfg/cfg-parsers/gcc.ts b/lib/cfg/cfg-parsers/gcc.ts index 81c0e8944..3d0d63c11 100644 --- a/lib/cfg/cfg-parsers/gcc.ts +++ b/lib/cfg/cfg-parsers/gcc.ts @@ -30,7 +30,7 @@ export class GccCFGParser extends BaseCFGParser { } override filterData(assembly: AssemblyLine[]) { - const isInstruction = (x: string) => x !== '' && !x.startsWith('#') && !x.match(/^\s+\./); + const isInstruction = (x: string) => !x.startsWith('#') && !x.match(/^\s+\./) && !x.match(/^\s*$/); const isFunctionName = (x: string) => x.endsWith(':') && x.includes('(') && x.includes(')'); const res: AssemblyLine[] = []; // preserve only labels that contain actual instructions, and not just comments/directives @@ -39,6 +39,7 @@ export class GccCFGParser extends BaseCFGParser { for (const line of assembly) { if (isFunctionName(line.text)) { res.push(line); + curLabel = line; sawInstInLabel = false; continue; }