The right hand side needs to be cast to int64_t before being shifted.

- Thanks to kojik1010.