fix: wrong parameter passed to getModuleFileName

The size was passed in bytes, not in number of TCHARs.

Signed-off-by: Vladislav Ryabov <vladislav.ryabov@intel.com>
This commit is contained in:
Ryabov, Vladislav
2023-06-22 01:53:53 -07:00
committed by Compute-Runtime-Automation
parent 12f597bc72
commit 6d41a6bc40

View File

@@ -23,7 +23,7 @@ std::string getCurrentLibraryPath() {
reinterpret_cast<LPCWSTR>(&getCurrentLibraryPath), &handle);
if (status != 0) {
status = NEO::SysCalls::getModuleFileName(handle, pathW, sizeof(pathW));
status = NEO::SysCalls::getModuleFileName(handle, pathW, MAX_PATH);
if (status != 0) {
std::wcstombs(path, pathW, MAX_PATH);
returnValue.append(path);