Skip to content

Commit 07c51d1

Browse files
committed
Update stringToHex.bat
1 parent 5887b35 commit 07c51d1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

stringutils/stringToHex.bat

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
:stringToHex
33
del tmp.hex >nul 2>nul
44
del tmp.str >nul 2>nul
5-
echo|(set /p=%~1)>tmp.str
5+
(echo|set /p=%~1)>tmp.str
66

77
certutil -encodehex tmp.str tmp.hex >nul
88
setlocal enableDelayedExpansion
@@ -13,6 +13,5 @@ for /f "usebackq tokens=2 delims= " %%A in ("tmp.hex") do (
1313
set hex_str=!hex_str: =!
1414

1515
)
16-
::clears EOF character
17-
set "hex_str=%hex_str:~0,-2%"
18-
(echo(!hex_str!)
16+
echo !hex_str!
17+
exit /b %errorlevel%

0 commit comments

Comments
 (0)