]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
seq(1): Consistently include 'last' for non-integers
authorcem <cem@FreeBSD.org>
Tue, 27 Feb 2018 22:01:40 +0000 (22:01 +0000)
committercem <cem@FreeBSD.org>
Tue, 27 Feb 2018 22:01:40 +0000 (22:01 +0000)
commit4956af63b10fe3d05a2b0e9dc6eb9bb7e97a4fce
tree094f042017879712bc4b9ee62ac7014e7f87e673
parent2ec60e4f583061907e8745f5839defc5537a6780
seq(1): Consistently include 'last' for non-integers

The source of error is a rounded increment being too large and thus the loop
steps slightly past 'last'.  Perform a final comparison using the formatted
string values (truncated precision) to determine if we still need to print
the 'last' value.

PR: 217149
Submitted by: Fernando ApesteguĂ­a <fernando.apesteguia AT gmail.com>,
Yuri Pankov <yuripv AT icloud.com> (earlier version)
Reported by: Martijn Dekker <mcdutchie AT hotmail.com>
Sponsored by: Dell EMC Isilon
usr.bin/seq/Makefile
usr.bin/seq/seq.c
usr.bin/seq/tests/Makefile [new file with mode: 0644]
usr.bin/seq/tests/seq_test.sh [new file with mode: 0755]