Don't try to strlen() the input buffer if the length is zero. That
was probably my idea of a feature, but if the input buffer actually does has a length of zero (as Melchior discovered for the case of a zero-length .nas file) then there will be no null.
This commit is contained in:
parent
a78dae1fb7
commit
239077599c
1 changed files with 0 additions and 2 deletions
|
@ -431,8 +431,6 @@ void FGNasalSys::readScriptFile(SGPath file, const char* module)
|
|||
void FGNasalSys::initModule(const char* moduleName, const char* fileName,
|
||||
const char* src, int len)
|
||||
{
|
||||
if(len == 0) len = strlen(src);
|
||||
|
||||
naRef code = parse(fileName, src, len);
|
||||
if(naIsNil(code))
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue