Fix module name length
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Wed, 12 Jul 2017 00:48:27 +0000 (03:48 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 13 Nov 2017 19:22:40 +0000 (22:22 +0300)
src/debug/debugger/modules.cpp

index 53d6536..56d23cc 100644 (file)
@@ -32,12 +32,11 @@ void SetCoreCLRPath(const std::string &coreclrPath)
 
 std::string GetModuleName(ICorDebugModule *pModule)
 {
-    char cname[mdNameLen];
     WCHAR name[mdNameLen];
     ULONG32 name_len = 0;
-    if (SUCCEEDED(pModule->GetName(mdNameLen, &name_len, name)))
+    if (SUCCEEDED(pModule->GetName(_countof(name), &name_len, name)))
     {
-        return to_utf8(name, name_len);
+        return to_utf8(name/*, name_len*/);
     }
     return std::string();
 }