Looks fine to me. Maybe it's worth adding a comment to the source to mention why we do it that way. And of course, a test so we don't break it in the future. :)
-- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"