trim the codename to the declared length (fixes #90)