From 9747a2b3595bbdca33fd6281e6a275c65d70903b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20H=C3=B6rnfeldt?= Date: Sat, 1 May 2021 14:44:08 +0200 Subject: [PATCH] Escape identifiers containing repeating dots --- ICSharpCode.Decompiler/Disassembler/DisassemblerHelpers.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ICSharpCode.Decompiler/Disassembler/DisassemblerHelpers.cs b/ICSharpCode.Decompiler/Disassembler/DisassemblerHelpers.cs index 58744d44ae..29e24ddbad 100644 --- a/ICSharpCode.Decompiler/Disassembler/DisassemblerHelpers.cs +++ b/ICSharpCode.Decompiler/Disassembler/DisassemblerHelpers.cs @@ -120,6 +120,9 @@ static bool IsValidIdentifier(string identifier) if (identifier[0] == '.') return identifier == ".ctor" || identifier == ".cctor"; + if (identifier.Contains("..")) + return false; + if (Metadata.ILOpCodeExtensions.ILKeywords.Contains(identifier)) return false;