Strings are hard. Depends on if count is the character count or the size we write to, I suppose the latter so count - 1. That comment was from an earlier edit, fixing.