aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsluicebox2019-11-19 19:52:16 -0800
committersluicebox2019-11-19 19:56:01 -0800
commit12fca19d59bed1a820ca470d6c6b69d8541eab4e (patch)
tree2deb4e48ff5dfa4c0dcbf73d35be52880ecd5100
parent62069d33c81836ab0e7ed70e128f3f8f6f3e39d9 (diff)
downloadscummvm-rg350-12fca19d59bed1a820ca470d6c6b69d8541eab4e.tar.gz
scummvm-rg350-12fca19d59bed1a820ca470d6c6b69d8541eab4e.tar.bz2
scummvm-rg350-12fca19d59bed1a820ca470d6c6b69d8541eab4e.zip
SCI: Fix kMenuSelect selecting disabled items
Fixes CAMELOT "draw sword" command causing bugs and lockups when it's not supposed to be available
-rw-r--r--engines/sci/graphics/menu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 8f6cfa1244..25d9edabe6 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -464,7 +464,7 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject, bool pauseSound) {
while (itemIterator != itemEnd) {
itemEntry = *itemIterator;
- if (!itemEntry->saidVmPtr.isNull()) {
+ if (!itemEntry->saidVmPtr.isNull() && itemEntry->enabled) {
byte *saidSpec = _segMan->derefBulkPtr(itemEntry->saidVmPtr, 0);
if (!saidSpec) {