Resolved strncpy -Wstringop-truncation warning in Qt NES header editor.
This commit is contained in:
parent
727e403917
commit
421c7b35e7
|
@ -827,7 +827,7 @@ bool iNesHeaderEditor_t::openFile(void)
|
|||
|
||||
if ( GameInfo == NULL )
|
||||
{
|
||||
strncpy( LoadedRomFName, filename.toStdString().c_str(), sizeof(LoadedRomFName) );
|
||||
strncpy( LoadedRomFName, filename.toStdString().c_str(), sizeof(LoadedRomFName)-1 );
|
||||
LoadedRomFName[sizeof(LoadedRomFName)-1] = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue