Still don't know why that would compile and work for 32bit and not 64bit.
Coincidence, I guess. Try with different data, I don't think that still will work correctly on 32-bit.
Because, you're type casting a wrong data type in
line #49, which causes memory problem.
By changing
line #9 of your code to:
TintArray = array of array of integer;
I got this: