From 8194117ea0c200f58ba65f77bf759e51f2cbf9ce Mon Sep 17 00:00:00 2001 From: Tim Greller Date: Sat, 30 May 2020 14:09:26 +0200 Subject: [PATCH] fix(win32): Fixed errorlevel expansion (#163) Without delayed-expansion the value of %errorlevel% gets expanded before the execution of csc. --- lib/win32/screenCapture_1.3.2.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/win32/screenCapture_1.3.2.bat b/lib/win32/screenCapture_1.3.2.bat index cb702b5..10b83e7 100644 --- a/lib/win32/screenCapture_1.3.2.bat +++ b/lib/win32/screenCapture_1.3.2.bat @@ -2,7 +2,7 @@ /* :batch @echo off -setlocal +setlocal enableDelayedExpansion :: find csc.exe set "csc=" @@ -15,7 +15,7 @@ if not exist "%csc%" ( if not exist "%~n0.exe" ( call %csc% /nologo /r:"Microsoft.VisualBasic.dll" /win32manifest:"app.manifest" /out:"%~n0.exe" "%~dpsfnx0" || ( - exit /b %errorlevel% + exit /b !errorlevel! ) ) %~n0.exe %*