diff --git a/src/drivers/Qt/iNesHeaderEditor.cpp b/src/drivers/Qt/iNesHeaderEditor.cpp index efc9e65e..ebddaf3f 100644 --- a/src/drivers/Qt/iNesHeaderEditor.cpp +++ b/src/drivers/Qt/iNesHeaderEditor.cpp @@ -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; }