Bizarre issue: For loop in DLL (witten in C) breaks early for no obvious reason
stefandoesinger at gmail.com
Wed Mar 14 16:54:54 CDT 2018
> Am 14.03.2018 um 10:43 schrieb Sebastian M. Ernst <ernst at pleiszenburg.de>:
> Hi everyone,
> I'd like to draw you attention to an bizarre issue I am experiencing:
> https://stackoverflow.com/q/49282888/1672565 <https://stackoverflow.com/q/49282888/1672565>
The calling convention mismatch that is explained in the comments sounds like a good guess to me because CDECL and STDCALL have different ideas on who cleans up the stack. The value of 'i' will be pushed to the stack before the call, but both conveyor_belt (because it is STDCALL) and the caller (because it thinks conveyor_belt is CDECL) will pop the call arguments, and eventually you'll pop something into i that is larger than len.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel