From 396e31850a3440eb77552c63a1d2b761ef527b53 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 5 May 2016 15:43:27 +0200 Subject: [PATCH] Get the proper filename for windows callstacks (currently unused) --- renderdoc/os/win32/win32_callstack.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderdoc/os/win32/win32_callstack.cpp b/renderdoc/os/win32/win32_callstack.cpp index 93112450b..1ec56ec89 100644 --- a/renderdoc/os/win32/win32_callstack.cpp +++ b/renderdoc/os/win32/win32_callstack.cpp @@ -733,7 +733,9 @@ Callstack::AddressDetails Win32CallstackResolver::GetAddr(DWORD64 addr) if(modules[i].moduleId != 0) info = GetAddrInfoForModule(modules[i].moduleId, addr); - wcsncpy_s(info.fileName, modules[i].name.c_str(), 126); + // if we didn't get a filename, default to the module name + if(info.fileName[0] == 0) + wcsncpy_s(info.fileName, modules[i].name.c_str(), 126); break; }