mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[util] Fix strlcpy compiler warning
This commit is contained in:
parent
f80347d9a9
commit
1c35fbb33c
@ -205,9 +205,10 @@ namespace dxvk::str {
|
||||
}
|
||||
|
||||
inline void strlcpy(char* dst, const char* src, size_t count) {
|
||||
std::strncpy(dst, src, count);
|
||||
if (count > 0)
|
||||
if (count > 0) {
|
||||
std::strncpy(dst, src, count - 1);
|
||||
dst[count - 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user