1
0
Fork 0

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:
andy 2005-04-26 17:18:00 +00:00
parent a78dae1fb7
commit 239077599c

View file

@ -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;