mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-26 14:00:08 +00:00
Use SDL_utf8strlcpy() to avoid MSVC secure CRT warnings
This commit is contained in:
1 parent
d9eca42311
commit
d94b92e247
1 file changed
+1
-3
@@ -60,9 +60,7 @@ char* OverlayManager::getOverlayText(OverlayType type)
|
|||||||
|
|
||||||
void OverlayManager::updateOverlayText(OverlayType type, const char* text)
|
void OverlayManager::updateOverlayText(OverlayType type, const char* text)
|
||||||
{
|
{
|
||||||
strncpy(m_Overlays[type].text, text, sizeof(m_Overlays[0].text));
|
SDL_utf8strlcpy(m_Overlays[type].text, text, sizeof(m_Overlays[0].text));
|
||||||
m_Overlays[type].text[getOverlayMaxTextLength() - 1] = '\0';
|
|
||||||
|
|
||||||
setOverlayTextUpdated(type);
|
setOverlayTextUpdated(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user