diff --git a/Source/Engine/Platform/Win32/Win32StringUtils.cpp b/Source/Engine/Platform/Win32/Win32StringUtils.cpp index fb7759cd2..352e214e0 100644 --- a/Source/Engine/Platform/Win32/Win32StringUtils.cpp +++ b/Source/Engine/Platform/Win32/Win32StringUtils.cpp @@ -164,8 +164,15 @@ Char* StringUtils::Copy(Char* dst, const Char* src) Char* StringUtils::Copy(Char* dst, const Char* src, int32 count) { - wcsncpy(dst, src, count - 1); - dst[count - 1] = 0; + if (count != 0) + { + wcsncpy(dst, src, count - 1); + dst[count - 1] = 0; + } + else + { + dst[0] = 0; + } return dst; }