Changeset 5125 in orxonox.OLD for trunk/src/util
- Timestamp:
- Aug 25, 2005, 3:04:49 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/shell.cc
r5124 r5125 203 203 // remove all chars from the BufferTexts. 204 204 if (this->bufferText) 205 for (int i; i < this->bufferDisplaySize; i++) 206 { 207 this->bufferText[i]->setText(NULL); 208 } 209 205 for (int i = 0; i < this->bufferDisplaySize; i++) 206 { 207 this->bufferText[i]->setText(NULL, true); 208 } 210 209 211 210 // delete all the Chars in the Buffers 212 211 tIterator<char>* charIterator = this->buffer->getIterator(); 213 212 char* charElem = charIterator->firstElement(); 214 215 213 while (charElem != NULL) 216 214 { … … 220 218 } 221 219 delete charIterator; 220 delete this->buffer; 221 this->buffer = new tList<char>; 222 222 } 223 223 … … 343 343 if (likely(this->inputLine != NULL)) 344 344 { 345 delete 345 delete[] this->inputLine; 346 346 } 347 347 this->inputLine = new char[1]; 348 348 *this->inputLine = '\0'; 349 this->inputLineText->setText(this->inputLine, true); 349 350 } 350 351 … … 405 406 { 406 407 this->addBufferLineStatic("Execute Command: %s\n", this->inputLine); 407 delete this->inputLine; 408 this->inputLine = new char[1]; 409 this->inputLine[0]='\0'; 410 this->inputLineText->setText(this->inputLine); 408 409 if (!strcmp(this->inputLine, "clear")) 410 { 411 this->flushBuffers(); 412 } 413 414 this->flushInputLine(); 415 411 416 return false; 412 417 }
Note: See TracChangeset
for help on using the changeset viewer.