make sure we don't divide by zero.

This will not happen currently, but if the size of the string becomes
dynamic, than it will be a real issue.