View Single Post
Old 28th July 2015, 20:06   #14
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Okay, here is another attempt

In previous version, the code was still using MulDiv(), which is signed. Unfortunately, there is no unsigned version of that function. So I had to implement my own UMulDiv() function. But then the linker failed with missing reference to __aulldiv(). Apparently a 64-Bit integer division in 32-Bit code requires CRT library calls - which isn't possible when the CRT is excluded from the binary, as in Inetc project. Bummer!

(In the end I had to add a custom __aulldiv() implementation to the Inetc project, as assembly code. Seems to work though)
Attached Files
File Type: zip inetc.signed-int-overflow-fix.V2.zip (32.3 KB, 239 views)
File Type: zip inetc-example.zip (54.1 KB, 212 views)

My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote