Fix bamboo compile error by calculating an integer with the same size as a pointer.