The following patch double-checks the vals array, and sees if there's any left over data. If so, it outputs the missing last line.
The following patch double-checks the vals array, and sees if there's any left over data. If so, it outputs the missing last line.