Skip to content

Commit

Permalink
BugFix: save & load custom line colours in map format version less th…
Browse files Browse the repository at this point in the history
…an 20

This will close Mudlet#2558 .

The bug was made in Mudlet#2106 which has
been present since before Mudlet 2.16.0 was released·

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
  • Loading branch information
SlySven committed May 23, 2019
1 parent 741774b commit 78708b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TMap.cpp
Expand Up @@ -1316,7 +1316,7 @@ bool TMap::serialize(QDataStream& ofs, int saveVersion)

QMap<QString, QList<int>> oldLinesColorData;
QMapIterator<QString, QColor> itCustomLineColor(pR->customLinesColor);
while (itCustomLine.hasNext()) {
while (itCustomLineColor.hasNext()) {
itCustomLineColor.next();
QString direction(itCustomLineColor.key());
QList<int> colorComponents;
Expand Down
2 changes: 1 addition & 1 deletion src/TRoom.cpp
Expand Up @@ -844,7 +844,7 @@ void TRoom::restore(QDataStream& ifs, int roomID, int version)
QMap<QString, QList<int>> oldLinesColorData;
ifs >> oldLinesColorData;
QMapIterator<QString, QList<int>> itCustomLineColor(oldLinesColorData);
while (itCustomLine.hasNext()) {
while (itCustomLineColor.hasNext()) {
itCustomLineColor.next();
QString direction(itCustomLineColor.key());
if (direction == QLatin1String("N") || direction == QLatin1String("E") || direction == QLatin1String("S") || direction == QLatin1String("W") || direction == QLatin1String("UP")
Expand Down

0 comments on commit 78708b2

Please sign in to comment.