...and the answer to this is that the curr_pos was calculated, and one of the terms in the calculation was an Int32, casting the entire result as an Int32.
Each term has to be cast to Int64 to maintain the integral type of the result.
This is the opposite to almost all (typed and psuedo typed) languages, and probably not exactly what is occuring. The type of an equation usually becomes the type of the largest type used in the equation.
So ...
long a = 30000L;
short b = a * 3; Will not compile because (a * 3) is of type long.. and you cannot implicitly cast down (in most languages). In C/C++, writing code like this will compile... however these langauges presume that you know what you are doing.
So what happens is the equation is cast to the larger type, but then when it comes to assignment you will suffer data loss (the answer to the above equation is 24464).
Likewise a simple way of forcing cast of an equation to double is to multiply by 1.0.
i.e. 3*1.0/4 = 0.75, but 3/4 = 0.