From c6e5776cc4cf6715362409d945349d672d4c11f0 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 22 Dec 2022 12:49:37 +0000 Subject: [PATCH] Crashlog: Windows: Fix sign error for symbol offsets in crashlog --- src/os/windows/crashlog_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp index 8b3a3ab3cc..68f9943849 100644 --- a/src/os/windows/crashlog_win.cpp +++ b/src/os/windows/crashlog_win.cpp @@ -574,7 +574,7 @@ char *CrashLogWindows::AppendDecodedStacktrace(char *buffer, const char *last) c free(demangled); #endif if (symbol_ok && bfd_info.function_addr) { - if (bfd_info.function_addr < frame.AddrPC.Offset) { + if (bfd_info.function_addr > frame.AddrPC.Offset) { buffer += seprintf(buffer, last, " - " OTTD_PRINTF64U, static_cast(bfd_info.function_addr) - frame.AddrPC.Offset); } else { buffer += seprintf(buffer, last, " + " OTTD_PRINTF64U, frame.AddrPC.Offset - static_cast(bfd_info.function_addr));