-- Corrected cast of 32-bit int to 64-bit pointer

-- Removes 64-bit portability issue.
Use C++ casting operators instead of C-style casts.