aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/rails.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/m4/rails.cpp')
-rw-r--r--engines/m4/rails.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/m4/rails.cpp b/engines/m4/rails.cpp
index 18b3bf7232..56faf204f0 100644
--- a/engines/m4/rails.cpp
+++ b/engines/m4/rails.cpp
@@ -79,7 +79,7 @@ static void checkPoint(int x, int y, int color, void *data) {
return;
else {
M4Surface *codes = isWalkableData->codes;
- if (x >= 0 && x < codes->w && y >= 0 && y < codes->h) {
+ if (x >= 0 && x < codes->width() && y >= 0 && y < codes->height()) {
isWalkableData->result = !((*((uint8*)codes->getBasePtr(x, y))) & 0x10);
} else {
isWalkableData->result = false;