From 51ad68b1b139455e38450218e9d499e08ac13f8e Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 16 Sep 2020 20:58:03 -0700 Subject: Fixed strncpy_s errors --- Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index 99f6012d..de01513f 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -26,7 +26,6 @@ */ #include "pch.h" -#include #include "RenderDeviceGLImpl.hpp" @@ -199,7 +198,9 @@ RenderDeviceGLImpl::RenderDeviceGLImpl(IReferenceCounters* pRefCounters, auto& AdapterInfo = m_DeviceCaps.AdapterInfo; - strncpy_s(AdapterInfo.Description, reinterpret_cast(glstrVendor.data()), _countof(AdapterInfo.Description) - 1); + for (size_t i = 0; i < _countof(AdapterInfo.Description) - 1 && i < glstrVendor.length(); ++i) + AdapterInfo.Description[i] = glstrVendor[i]; + AdapterInfo.Type = ADAPTER_TYPE_HARDWARE; AdapterInfo.VendorId = 0; AdapterInfo.DeviceId = 0; -- cgit v1.2.3