Skip to content

Commit

Permalink
DM: Fix multiword item names with debug command gimme
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent cba80bc commit 834595a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions engines/dm/console.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 834595a

Please sign in to comment.