summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
index 246811be..ad29fd21 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
@@ -26,8 +26,6 @@
*/
#include "pch.h"
-#include <string.h>
-
#include "RenderDeviceVkImpl.hpp"
#include "PipelineStateVkImpl.hpp"
#include "ShaderVkImpl.hpp"
@@ -162,7 +160,10 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
const auto& DeviceProps = m_PhysicalDevice->GetProperties();
- strncpy_s(AdapterInfo.Description, DeviceProps.deviceName, _countof(AdapterInfo.Description) - 1);
+ static_assert(_countof(AdapterInfo.Description) <= _countof(DeviceProps.deviceName), "");
+ for (size_t i = 0; i < _countof(AdapterInfo.Description) - 1 && DeviceProps.deviceName[i] != 0; ++i)
+ AdapterInfo.Description[i] = DeviceProps.deviceName[i];
+
AdapterInfo.Type = ADAPTER_TYPE_HARDWARE;
AdapterInfo.Vendor = VendorIdToAdapterVendor(DeviceProps.vendorID);
AdapterInfo.VendorId = DeviceProps.vendorID;