shell: Avoid modulo by zero error in positioning algorithm

As spotted by Philipp Brüschweiler <blei42@gmail.com>
1 file changed