mirror of
https://github.com/minetest/minetestmapper.git
synced 2024-11-25 00:43:51 +01:00
Fix bug introduced in 9096f70
This commit is contained in:
parent
a160dc051c
commit
84c4fc40f8
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PixelAttributes.h"
|
#include "PixelAttributes.h"
|
||||||
|
#include <cstring>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
PixelAttributes::PixelAttributes():
|
PixelAttributes::PixelAttributes():
|
||||||
m_width(0)
|
m_width(0)
|
||||||
@ -35,9 +34,10 @@ void PixelAttributes::setWidth(int width)
|
|||||||
|
|
||||||
void PixelAttributes::scroll()
|
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) {
|
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