mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-21 15:03:49 +01:00
Fix bug introduced in 9096f70
This commit is contained in:
parent
a160dc051c
commit
84c4fc40f8
@ -8,8 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "PixelAttributes.h"
|
||||
|
||||
using namespace std;
|
||||
#include <cstring>
|
||||
|
||||
PixelAttributes::PixelAttributes():
|
||||
m_width(0)
|
||||
@ -35,9 +34,10 @@ void PixelAttributes::setWidth(int width)
|
||||
|
||||
void PixelAttributes::scroll()
|
||||
{
|
||||
*m_pixelAttributes[FirstLine] = *m_pixelAttributes[LastLine];
|
||||
size_t lineLength = m_width * sizeof(PixelAttribute);
|
||||
memcpy(m_pixelAttributes[FirstLine], m_pixelAttributes[LastLine], lineLength);
|
||||
for (size_t i = 1; i < LineCount - 1; ++i) {
|
||||
*m_pixelAttributes[i] = *m_pixelAttributes[EmptyLine];
|
||||
memcpy(m_pixelAttributes[i], m_pixelAttributes[EmptyLine], lineLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user