Skip to content

Instantly share code, notes, and snippets.

@AnrDaemon
Created March 28, 2020 17:31
Show Gist options
  • Save AnrDaemon/d4411ee716e24a0bc70391c81dde3bce to your computer and use it in GitHub Desktop.
Save AnrDaemon/d4411ee716e24a0bc70391c81dde3bce to your computer and use it in GitHub Desktop.
TCC crash on return from subroutine call
@ECHO OFF
GOSUB test %[1]
ECHO %[1]:Ok
QUIT
:test [rc]
REM "%[SystemRoot]\System32\cmd.exe" /S /K "EXIT %[rc]"
.\testme.exe %[rc]
RETURN
DO I = 0 TO 255
"%ComSpec%" /B /C .\tc-test.btm %[I]
ENDDO
@AnrDaemon
Copy link
Author

When the last external program in a subroutine exit with code 3, entire TCC chain crashes after RETURN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment