fix casting-pointers-to-ints bug