Compiler crashes if using nested !include to 8 levels deep and then try to use ${For} from LogicLib.
====MAIN SCRIPT====
!include LogicLib.nsh
OutFile "NESTTEST.EXE"
InstallDir $DESKTOP\Example1
RequestExecutionLevel user
ShowInstDetails show
Page components
Page instfiles
Section "nested includes test" NESTTEST
!define FILENUM "0"
!include "file1.nsh"
SectionEnd
====FILE1.NSH====
!ifdef _FILENUM
!undef _FILENUM
!endif
!define /math _FILENUM ${FILENUM} + 1
!echo `I am include number ${_FILENUM}`
!undef FILENUM
!define FILENUM ${_FILENUM}
${For} $R0 1 5
${Next}
!if ${FILENUM} < 16
!include "file1.nsh"
!endif
Last 4 lines of compiler output (before the crash) are:
I am include number 8 (file1.nsh:5)
!undef: "FILENUM"
!define: "FILENUM"="8"
!insertmacro: _For
If you take out the ${For} and ${Next} then you get:
I am include number 10 (file1.nsh:5)
!undef: "FILENUM"
!define: "FILENUM"="10"
!include: "file1.nsh"
parseScript: too many levels of includes (10 max).
So if 10 is the max, why does the ${For} statement cause a crash at 8 levels?
NSIS 2.46 standard build.
Thanks, fixed.