mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +00:00
Update to keeping config comments (Feature #2535)
-An attempt to fix Coverity-Scan warning (see: https://github.com/OpenMW/openmw/pull/618#discussion_r33641670) - Unable to test until a PR can be submitted.
This commit is contained in:
parent
5538f822f4
commit
da85b3a4ee
1 changed files with 2 additions and 1 deletions
|
@ -291,7 +291,8 @@ bool Config::GameSettings::writeFileWithComments(QFile &file)
|
|||
if (!comments.empty() && index != -1 && settingRegex.captureCount() >= 2 &&
|
||||
mUserSettings.find(settingRegex.cap(1)) != mUserSettings.end())
|
||||
{
|
||||
for (std::vector<QString>::const_iterator it = comments.begin(); it != comments.end(); ++it)
|
||||
for (std::vector<QString>::const_iterator it = comments.begin();
|
||||
it != comments.end() && commentStart != fileCopy.end(); ++it)
|
||||
{
|
||||
*commentStart = *it;
|
||||
++commentStart;
|
||||
|
|
Loading…
Reference in a new issue