From a2bed1743a4fc9288bd5b6284158621cc578e32c Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:15:52 +0200 Subject: [PATCH] Changed algorithm --- src/net/JNetReflector/JNetReflectorHelper.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/net/JNetReflector/JNetReflectorHelper.cs b/src/net/JNetReflector/JNetReflectorHelper.cs index ac7f727529..ab13d40ad0 100644 --- a/src/net/JNetReflector/JNetReflectorHelper.cs +++ b/src/net/JNetReflector/JNetReflectorHelper.cs @@ -124,9 +124,13 @@ public static IDictionary> ExtractJav } else { lines.Add(line); cycleCounter = 0; } - if (line.TrimEnd() == "}") foundParenthesis = true; + if (line.TrimEnd() == "}") + { + foundParenthesis = true; + break; + } } - while (!foundParenthesis || cycleCounter >= 100); + while (cycleCounter < 100); Dictionary map = new Dictionary(); int classCounter = -1; @@ -135,6 +139,8 @@ public static IDictionary> ExtractJav bool nextLineIsDescriptor = false; foreach (var line in lines) { + if (string.IsNullOrWhiteSpace(line)) continue; + if (line.Contains("Compiled from")) { if (classCounter != -1) { dict.TryAdd(toBeAnalyzed[classCounter], map); }