diff options
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/Windows/path.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mir_core/src/Windows/path.cpp b/src/mir_core/src/Windows/path.cpp index eb14c6b0de..907de96b74 100644 --- a/src/mir_core/src/Windows/path.cpp +++ b/src/mir_core/src/Windows/path.cpp @@ -130,8 +130,10 @@ MIR_CORE_DLL(int) PathIsAbsoluteW(const wchar_t *path) MIR_CORE_DLL(int) PathToRelativeW(const wchar_t *pSrc, wchar_t *pOut, const wchar_t *pBase)
{
- if (!pSrc || !pSrc[0] || wcslen(pSrc) > MAX_PATH)
+ if (!pSrc || !pSrc[0] || wcslen(pSrc) > MAX_PATH) {
+ *pOut = 0;
return 0;
+ }
if (!PathIsAbsoluteW(pSrc))
wcsncpy_s(pOut, MAX_PATH, pSrc, _TRUNCATE);
|