linewrap: fix out-of-bound write to line map