Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b00c55

Browse files
committed
Check ports for nsis 3
1 parent dd92347 commit 2b00c55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nsis/Ports.nsh

+5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ Function IsPortOpen
6767
IntOp $4 $4 + $5 # skip to entry
6868
System::Call *$4(i,i.r4)
6969
${EndIf}
70+
!if "${NSIS_PACKEDVERSION}" >= 50343936 ; v3.3+
71+
System::Call ws2_32::ntohs(hr4)h.r4
72+
!else
7073
System::Call ws2_32::ntohs(ir4)i.r4
74+
IntOp $4 $4 & 0xffff ; Truncate to 16-bits
75+
!endif
7176

7277
${If} $4 = $R0
7378
StrCpy $R0 "open"

0 commit comments

Comments
 (0)