diff --git a/core/debug/trace/trace_windows.odin b/core/debug/trace/trace_windows.odin index 42af98261..f78a7c7cd 100644 --- a/core/debug/trace/trace_windows.odin +++ b/core/debug/trace/trace_windows.odin @@ -97,10 +97,8 @@ _resolve :: proc(bt: Capture, allocator, temp_allocator: runtime.Allocator) -> ( lineInfo: win.IMAGEHLP_LINE64 lineInfo.SizeOfStruct = size_of(lineInfo) if win.SymGetLineFromAddrW64(process, win.DWORD64(bt[i]), &{}, &lineInfo) { - line.file_path, mem_err = win.wstring_to_utf8(lineInfo.FileName, len(lineInfo.FileName), allocator) - if mem_err != nil { - line.file_path = OOM_MARKER - } + file_name, mem_err := win.wstring_to_utf8(lineInfo.FileName, len(lineInfo.FileName), allocator) + line.file_path = mem_err == nil ? file_name : OOM_MARKER line.line = i32(lineInfo.LineNumber) } else { location := strings.builder_make(allocator)