Fixed handling issue where it would misparse lines that would contain new/singleton/datablock keywords

fixed incorrect getSubStr function invoke
This commit is contained in:
JeffR 2022-01-30 19:14:36 -06:00
parent 630285def6
commit 5e1eb80bc1
2 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@ function Pre40ImporterPage0::openPage(%this)
%sanitizedFilename = sanitizeString(%fileBase);
if(startsWith(%sanitizedFilename, "_"))
{
%sanitizedFilename = substr(%sanitizedFilename, 1, -1);
%sanitizedFilename = getSubstr(%sanitizedFilename, 1, -1);
}
if(%sanitizedFilename !$= %fileBase)
{

View file

@ -476,7 +476,7 @@ function preprocessImportingFiles()
{
%line = $ProjectImporter::fileObject.readLine();
if(strIsMatchExpr("*new*(*)*", %line) && !strIsMatchExpr("*\"*new*(*)*\"*", %line))
if(strIsMatchExpr("* new*(*)*", %line))
{
%start = strpos(%line, "new ");
%end = strpos(%line, "(", %start);
@ -530,7 +530,7 @@ function preprocessImportingFiles()
%insideObjectBlock = true;
}
}
else if(strIsMatchExpr("*datablock*(*)*", %line))
else if(strIsMatchExpr("* datablock*(*)*", %line))
{
%start = strpos(%line, "datablock ");
%end = strpos(%line, "(", %start);
@ -584,7 +584,7 @@ function preprocessImportingFiles()
%insideObjectBlock = true;
}
}
else if(strIsMatchExpr("*singleton*(*)*", %line))
else if(strIsMatchExpr("* singleton*(*)*", %line))
{
%start = strpos(%line, "singleton ");
%end = strpos(%line, "(", %start);