mp.c: Convert shift amounts via `index' to prevent `float' and `str'.