Defend against buffer overflow of ci_array:
 code always overwrites one entry beyond end of array, now fixed
--Craig Markwardt