Avoid array subcript errors for ctype functions