mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 08:00:56 -04: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 &&
|
if (!comments.empty() && index != -1 && settingRegex.captureCount() >= 2 &&
|
||||||
mUserSettings.find(settingRegex.cap(1)) != mUserSettings.end())
|
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 = *it;
|
||||||
++commentStart;
|
++commentStart;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user