Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7771 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
May 23, 2006, 2:19:54 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Fixed a Bug in the Shell Exection, that compromised a Vector

Location:
trunk/src/lib/shell
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_command.cc

    r7742 r7771  
    185185            fillObjectList("", (*alias)->getCommand(), boList);
    186186        }
     187        paramBegin = 1;
    187188        return (*alias)->getCommand();
    188189      }
     
    290291
    291292    unsigned int paramBegin;
    292     const ShellCommand* sc;
     293    const ShellCommand* sc = NULL;
    293294    std::vector<BaseObject*> boList;
    294295    sc = getCommandFromInput(inputSplits, paramBegin, &boList);
    295296    if (sc != NULL)
    296297    {
    297       PRINT(0)("Command %s on ", sc->getName());
    298298      for(std::vector<BaseObject*>::const_iterator bo = boList.begin(); bo != boList.end(); ++bo)
    299299      {
    300         PRINT(0)("%s::%s\n", (*bo)->getClassName(), (*bo)->getName());
    301         (*sc->executor)((*bo), inputSplits.getSubSet(paramBegin).join());
     300        PRINT(0)("Command '%s' on '%s::%s'\n", sc->getName(), (*bo)->getClassName(), (*bo)->getName());
     301        (*sc->executor)((*bo), inputSplits.getSubSet(paramBegin));
    302302      }
    303303      return true;
  • trunk/src/lib/shell/shell_input.cc

    r7729 r7771  
    175175
    176176    // adding the new Command to the History
    177     if (history.back() != this->inputLine)
     177    if (history.empty() || history.back() != this->inputLine)
    178178      this->history.push_back(this->inputLine);
    179179    if (this->history.size() > this->historyLength)
Note: See TracChangeset for help on using the changeset viewer.