Fixed off-by-one error when doing %lin wrapping.

This commit is contained in:
Fang 2017-11-02 16:19:50 +01:00
parent de061524cf
commit 80b4278554

View File

@ -2067,13 +2067,13 @@
=/ txt (tuba (trip msg.sep)) =/ txt (tuba (trip msg.sep))
|- ^- (list tape) |- ^- (list tape)
?~ txt ~ ?~ txt ~
=/ end =+ ^- {end/@ud nex/?}
?: (lte (lent txt) wyd) (lent txt) ?: (lte (lent txt) wyd) [(lent txt) &]
=+ ace=(find " " (flop (scag +(wyd) `(list @c)`txt))) =+ ace=(find " " (flop (scag +(wyd) `(list @c)`txt)))
?~ ace wyd ?~ ace [wyd |]
(sub wyd u.ace) [(sub wyd u.ace) &]
:- (weld pef (tufa (scag end `(list @c)`txt))) :- (weld pef (tufa (scag end `(list @c)`txt)))
$(txt (slag +(end) `(list @c)`txt), pef (reap (lent pef) ' ')) $(txt (slag ?:(nex +(end) end) `(list @c)`txt), pef (reap (lent pef) ' '))
:: ::
$inv $inv
:_ ~ :_ ~