mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 22:20:33 +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
@ -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…
x
Reference in New Issue
Block a user