From b6cb5ddbea658ccc53d6cdea710a069d67dcdd73 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Sat, 23 Aug 2025 16:20:24 +0500 Subject: [PATCH] more fatal error cleanups --- .../LogParserResultFormatter.GeneralNotesSection.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs index 195572f9..359ecda9 100644 --- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs +++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs @@ -652,9 +652,11 @@ internal static partial class LogParserResult win32ErrorCodes.Add(hexCode); } var trimIdx = fatalError.IndexOf(" Called from"); + if (trimIdx is -1) + trimIdx = fatalError.IndexOf("(in file"); var errorTxt = fatalError; if (trimIdx > -1) - errorTxt = fatalError[..trimIdx]; + errorTxt = fatalError[..trimIdx].TrimEnd(); errorTxt = errorTxt.Trim(EmbedPager.MaxFieldLength - 7); builder.AddField(sectionName, $"```\n{errorTxt}```"); }