Correct segment index.

When encoding multiple letters, the segments seem to shift, which I think is caused by an off-by-one error in addSegment. I've applied the fix in my code and it seems to work -- code segments align correctly with the glyphs.

Since you're only encoding one glyph it might be that you've never encountered the issue. Or I might be completely wrong :-)

Note that I've only tested this with cmap format 4 -- other formats might cause different issues.