You're almost right !
It's not a typo but a mistake in conversion by me... The executable is in Pascal
but I had to covert it from C to Pascal because I don't have a C compiler.
That's where I made a mistake !
In C: if (k1 >= 10) calc |= 1; <- this sets the Least Significant Bit of calc to 1
In Pascal: if k1>=10 then calc:=calc+1; <- wrong ! should to be :
if (k1>=10) and (k1 mod 2 = 0) then calc:=calc+1;
I checked it a minute ago and it generates wrong passes when I change it.
Can someone confirm that the following two pieces of code do the same thing !?
In C: if (k1 >= 10) calc |= 1;
In Pascal: if (k1>=10) and (k1 mod 2 = 0) then calc:=calc+1;