Yeah, this is a paranoid overflow test. Technically, using `gint` won't guarantee anything either, but this is all very theoretic. If you think it's confusing, I'll just get rid of it.

The `'0' < ... < '9'` thing is actually guaranteed by the C standard.