e2e5b5495fd1365012c2b1b1bcbae5d923975f28
The center branch of resize() added the odd-padding space whenever the input was non-empty, because the parity check omitted the source length (wantLen - padLn*2 instead of wantLen - sLen - padLn*2). This made Resize, Align and their utf8 variants overflow wantLen by one for every non-empty string with an even amount of padding. Subtract sLen so the extra space is only added when the total padding is actually odd.
Description
My contributions to gookit/goutil: 4 commits, 1 merged PRs
49 KiB
0 Stars
1 Watchers
0 Forks
Languages
Go
100%