Really fixing searchHotspot, syntax-wise at least. (Note: Hotspots::Hotspot::left is unsigned, so a comparison with -1 will always yield false. And for left == 0xFFFF a method already exists, Hotspots::Hotspot::isEnd())
svn-id: r44022
This commit is contained in:
parent
3259a6f0b5
commit
ae3cc2ca5f
1 changed files with 1 additions and 1 deletions
|
@ -1567,7 +1567,7 @@ int16 Hotspots::findCursor(uint16 x, uint16 y) const {
|
|||
|
||||
bool Hotspots::searchHotspot(int16 shortId) const {
|
||||
for (int i = 0; i < kHotspotCount; i++) {
|
||||
if (_hotspots[i].left == -1)
|
||||
if (_hotspots[i].isEnd())
|
||||
return false;
|
||||
if ((_hotspots[i].id == 0xD000 + shortId) || (_hotspots[i].id == 0xB000 + shortId) || (_hotspots[i].id == 0x4000 + shortId))
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue