aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-22 21:51:28 -0400
committerPaul Gilbert2015-08-22 21:51:28 -0400
commitc87a73f9fd5ebd6039a17a43c59c661e8b976ca8 (patch)
treed46df1e61a8ee4c7c25def9e002ef9939d63a2e4
parentc6633404c9580aab1c312d8ad1adadcaf4797a8d (diff)
downloadscummvm-rg350-c87a73f9fd5ebd6039a17a43c59c661e8b976ca8.tar.gz
scummvm-rg350-c87a73f9fd5ebd6039a17a43c59c661e8b976ca8.tar.bz2
scummvm-rg350-c87a73f9fd5ebd6039a17a43c59c661e8b976ca8.zip
SHERLOCK: RT: Add missing verb filter for actions starting with '*'
This fixes '*Solve' appearing as an option in the right click menu for the Foolscap before you pick it up
-rw-r--r--engines/sherlock/tattoo/widget_verbs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sherlock/tattoo/widget_verbs.cpp b/engines/sherlock/tattoo/widget_verbs.cpp
index 975d540053..0b523a93e9 100644
--- a/engines/sherlock/tattoo/widget_verbs.cpp
+++ b/engines/sherlock/tattoo/widget_verbs.cpp
@@ -90,10 +90,10 @@ void WidgetVerbs::load(bool objectsOn) {
// Add any extra active verbs from the object's verb list
for (int idx = 0; idx < 6; ++idx) {
- if (!ui._bgShape->_use[idx]._verb.empty() && !ui._bgShape->_use[idx]._verb.hasPrefix(" ") &&
- (ui._bgShape->_use[idx]._target.empty() || ui._bgShape->_use[idx]._target.hasPrefix("*") ||
- ui._bgShape->_use[idx]._target.hasPrefix(" "))) {
- _verbCommands.push_back(ui._bgShape->_use[idx]._verb);
+ UseType &use = ui._bgShape->_use[idx];
+ if (!use._verb.empty() && !use._verb.hasPrefix(" ") && !use._verb.hasPrefix("*") &&
+ (use._target.empty() || use._target.hasPrefix("*") || use._target.hasPrefix(" "))) {
+ _verbCommands.push_back(use._verb);
}
}
}