aboutsummaryrefslogtreecommitdiff
path: root/engines/dm
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-11 10:23:02 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit834595a7f9de4835e93823caa8df5c0e175102c8 (patch)
tree839dfd44311ba108c4d997f878f35b22cc5c3fbe /engines/dm
parentcba80bc69dc94022ab77e6c81ff2098bbdc8748f (diff)
downloadscummvm-rg350-834595a7f9de4835e93823caa8df5c0e175102c8.tar.gz
scummvm-rg350-834595a7f9de4835e93823caa8df5c0e175102c8.tar.bz2
scummvm-rg350-834595a7f9de4835e93823caa8df5c0e175102c8.zip
DM: Fix multiword item names with debug command gimme
Diffstat (limited to 'engines/dm')
-rw-r--r--engines/dm/console.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/dm/console.cpp b/engines/dm/console.cpp
index baffd027c6..e9a937c823 100644
--- a/engines/dm/console.cpp
+++ b/engines/dm/console.cpp
@@ -165,7 +165,7 @@ bool Console::Cmd_map(int argc, const char** argv) {
// not >= because dimensions are inslucsive
if (index < 0 || index >= _vm->_dungeonMan->_g278_dungeonFileHeader._mapCount) {
- debugPrintf("Map index %d is out of bounds, possible values [0, %d]\n", _vm->_dungeonMan->_g278_dungeonFileHeader._mapCount - 1);
+ debugPrintf("Map index %d is out of bounds, possible values [0, %d]\n", index, _vm->_dungeonMan->_g278_dungeonFileHeader._mapCount - 1);
return true;
}
@@ -216,8 +216,11 @@ bool Console::Cmd_gimme(int argc, const char** argv) {
}
Common::String requestedItemName;
- for (int16 i = 1; i < argc; ++i)
+ for (int16 i = 1; i < argc; ++i) {
requestedItemName += argv[i];
+ requestedItemName += " ";
+ }
+ requestedItemName.deleteLastChar();
for (int16 thingType = 0; thingType < 16; ++thingType) { // 16 number of item types
uint16 *thingDataArray = _vm->_dungeonMan->_g284_thingData[thingType];