split: fix bug when using non-zero-terminated arguments