From 8f8d6782b8806ace11a9b3a0ce9d4d578f717e5f Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sun, 9 Jun 2019 00:28:18 +0530 Subject: HDB: Fix isSky to return correct skyIndex --- engines/hdb/draw-manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index eca4e22279..1e69130617 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -145,7 +145,7 @@ int DrawMan::isSky(int index) { for (int i = 0; i < kMaxSkies; i++) { if(_skyTiles[i] == index) { - return index + 1; // The skyTiles are indexed from 1. 0 => No Sky tile + return i + 1; // The skyTiles are indexed from 1. 0 => No Sky tile } } -- cgit v1.2.3