fixed infinite loop 0 length array

sumh <42424861@qq.com>