1
0
Fork 0

Pick some lowhanging fruit. (some memory leaks and unused variables)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4264
This commit is contained in:
Peter Veenstra 2019-10-01 12:11:09 +00:00
parent ca20ca3a3e
commit a919e33aec
4 changed files with 7 additions and 3 deletions

View file

@ -134,7 +134,10 @@ AutoexecObject::~AutoexecObject(){
if ((strncasecmp(buf2,"set ",4) == 0) && (strlen(buf2) > 4)){
char* after_set = buf2 + 4;//move to variable that is being set
char* test = strpbrk(after_set,"=");
if (!test) continue;
if (!test) {
delete [] buf2;
continue;
}
*test = 0;
stringset = true;
//If the shell is running/exists update the environment

View file

@ -368,7 +368,7 @@ void DOS_Shell::InputCommand(char * line) {
// remove current command from history if it's there
if (current_hist) {
current_hist=false;
// current_hist=false;
l_history.pop_front();
}