Use an unsigned int for the version and add a helper macro so the code is simplified (and so the error message is a common string).