Adjust ci->nregs to prevent heap corruption
Merge pull request #1130 from gzohari/adjust_ci_nregs

Adjust ci->nregs to prevent heap corruption