mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-07-13 02:15:33 +00:00
Use SDL_utf8strlcpy() to avoid MSVC secure CRT warnings
This commit is contained in:
@@ -60,9 +60,7 @@ char* OverlayManager::getOverlayText(OverlayType type)
|
||||
|
||||
void OverlayManager::updateOverlayText(OverlayType type, const char* text)
|
||||
{
|
||||
strncpy(m_Overlays[type].text, text, sizeof(m_Overlays[0].text));
|
||||
m_Overlays[type].text[getOverlayMaxTextLength() - 1] = '\0';
|
||||
|
||||
SDL_utf8strlcpy(m_Overlays[type].text, text, sizeof(m_Overlays[0].text));
|
||||
setOverlayTextUpdated(type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user