aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/access/asurface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp
index c9c335e894..624721920a 100644
--- a/engines/access/asurface.cpp
+++ b/engines/access/asurface.cpp
@@ -331,17 +331,17 @@ void ASurface::moveBufferLeft() {
void ASurface::moveBufferRight() {
byte *p = (byte *)getPixels();
- Common::copy_backward(p, p + (w * h) - TILE_WIDTH, p + (w * h));
+ Common::copy_backward(p, p + (pitch * h) - TILE_WIDTH, p + (pitch * h));
}
void ASurface::moveBufferUp() {
byte *p = (byte *)getPixels();
- Common::copy(p + (w * TILE_HEIGHT), p + (w * h), p);
+ Common::copy(p + (pitch * TILE_HEIGHT), p + (pitch * h), p);
}
void ASurface::moveBufferDown() {
byte *p = (byte *)getPixels();
- Common::copy_backward(p, p + (w * (h - TILE_HEIGHT)), p + (w * h));
+ Common::copy_backward(p, p + (pitch * (h - TILE_HEIGHT)), p + (pitch * h));
}
} // End of namespace Access