mirror of
https://github.com/86Box/86Box.git
synced 2025-01-23 17:52:01 -05:00
qt: GL core; use safe version of strcpy
This commit is contained in:
parent
ec7c2643e0
commit
105fe47bf3
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
|||
* Copyright 2022 Teemu Korhonen
|
||||
*/
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QFile>
|
||||
#include <QRegularExpression>
|
||||
#include <QStringBuilder>
|
||||
|
@ -89,7 +90,7 @@ OpenGLOptions::save() const
|
|||
auto path = m_shaders.first().path().toLocal8Bit();
|
||||
|
||||
if (!path.isEmpty())
|
||||
strcpy(video_shader, path.constData());
|
||||
qstrncpy(video_shader, path.constData(), sizeof(video_shader));
|
||||
else
|
||||
video_shader[0] = '\0';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue