View Single Post
Old 28th November 2017, 12:24   #2
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,090
This is not a bug in Windows, the function is documented as returning a 16-bit value and the upper part of EAX should be ignored. Unfortunately the System plug-in does not have a 16-bit return type but you can use this workaround:

System::Call ws2_32::ntohs(ir4)i.r4
IntOp $4 $4 & 0xffff

This seems to affect others as well so it might get "fixed" in the next Windows release.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote