src: fix style
src: fix bug with odd-length result array