Merge pull request #979 from mjunix/small-fixes

Small fixes
This commit is contained in:
Brian Roberts 2023-03-06 19:31:07 -06:00 committed by GitHub
commit b257ac3d1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 19 additions and 11 deletions

View file

@ -1302,7 +1302,8 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
CodeBlock *newCodeBlock = new CodeBlock();
newCodeBlock->compileExec(scriptFileName, script, noCalls, 0);
delete[] script;
delete newCodeBlock;
execDepth--;
return true;
}
@ -1476,6 +1477,7 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
code->read(scriptFileName, *compiledStream);
delete compiledStream;
code->exec(0, scriptFileName, NULL, 0, NULL, noCalls, NULL, 0);
delete code;
ret = true;
}
else

View file

@ -490,8 +490,8 @@ DefineEngineFunction(getDirectoryList, String, ( const char* path, S32 depth ),
if (fullpath[dStrlen(fullpath) - 1] != '/')
{
S32 pos = dStrlen(fullpath);
fullpath[pos] = '/';
fullpath[pos + 1] = '\0';
fullpath[pos - 1] = '/';
fullpath[pos] = '\0';
}
// Dump the directories.

View file

@ -925,6 +925,7 @@ void TelnetDebugger::evaluateExpression(const char *tag, S32 frame, const char *
dSprintf( buffer, len, format, tag, result.getString()[0] ? result.getString() : "\"\"" );
send( buffer );
delete newCodeBlock;
delete [] buffer;
}