Fix terminfo::param %i op
auto merge of #7160 : kballard/rust/terminfo-parm-i-fix, r=thestinger

My latest terminfo work introduced a bug in the handling of %i, which was noticed by @huonw after the PR was already merged in.

r? @thestinger