Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7342 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
Apr 19, 2006, 4:08:09 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ShellBuffer and ShellInput had the segfault-capability for years, now they have not anymore :)

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

Legend:

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

    r7341 r7342  
    337337  */
    338338
    339   //   lastText->setRelCoor2D(this->calculateLinePosition(0));
    340 
    341339  this->bufferText.front()->setText(text);
    342340}
     
    381379  // redisplay the buffers
    382380  list<std::string>::const_iterator it = this->bufferIterator;
     381  if (it == ShellBuffer::getInstance()->getBuffer().end())
     382  {
     383    /// FIXME
     384    PRINTF(1)("Should not heappen\n");
     385    it--;
     386  }
    383387  for (std::list<Text*>::iterator textIt = this->bufferText.begin(); textIt != this->bufferText.end(); ++textIt)
    384388  {
    385389    (*textIt)->setText((*it));
     390    if (it == ShellBuffer::getInstance()->getBuffer().begin())
     391    {
     392      /// FIXME
     393      PRINTF(1)("Should not heappen\n");
     394      break;
     395    }
    386396    it--;
    387397  }
  • trunk/src/lib/shell/shell_input.cc

    r7341 r7342  
    229229  if (!this->historyScrolling)
    230230    return;
    231   if (this->historyIT != this->history.end())
     231  if (!this->history.empty() && this->historyIT != --this->history.end())
    232232  {
    233233    std::string nextElem = *(++this->historyIT);
Note: See TracChangeset for help on using the changeset viewer.