Defend against buffer overflow of build_channel_array() 

 build_channel_array() always overwrites one entry beyond end of ci_array array, now fixed
--Craig Markwardt