diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-02 19:22:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-02 19:22:45 +0300 |
commit | fc28eefaed2c71a824677b613f87dc4ceaea243b (patch) | |
tree | af0905e94205ac3e18cf130041980c8f675b658f /src/resources/map/maplayer.cpp | |
parent | 59559081b9477a14a748ca66a5ede1b7457c1a46 (diff) | |
download | plus-fc28eefaed2c71a824677b613f87dc4ceaea243b.tar.gz plus-fc28eefaed2c71a824677b613f87dc4ceaea243b.tar.bz2 plus-fc28eefaed2c71a824677b613f87dc4ceaea243b.tar.xz plus-fc28eefaed2c71a824677b613f87dc4ceaea243b.zip |
Fix nullpointer access in special layer draw function.
Diffstat (limited to 'src/resources/map/maplayer.cpp')
-rw-r--r-- | src/resources/map/maplayer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 95e835302..deaeab9de 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -391,7 +391,7 @@ void MapLayer::drawSpecialLayer(Graphics *const graphics, const MapItem *item0 = mSpecialLayer->mTiles[ptr + startX]; if (!item0 || item0->mType == MapItemType::EMPTY) { - x0 += mSpecialLayer->mCache[ptr + startX]; + x0 += mSpecialLayer->mCache[ptr + startX] + 1; } for (int x = x0; x < endX1; x++) { @@ -414,7 +414,7 @@ void MapLayer::drawSpecialLayer(Graphics *const graphics, item0 = mTempLayer->mTiles[ptr + startX]; if (!item0 || item0->mType == MapItemType::EMPTY) { - x0 += mTempLayer->mCache[ptr + startX]; + x0 += mTempLayer->mCache[ptr + startX] + 1; } for (int x = x0; x < endX1; x++) { |