(get_line): backport off by two fix from