line number calculation

Fixed the special case of the "-" character