Prevent the hex edit cursor from ending up past the end of the page