line-log: fix "log -LN" crash when N is last line of file