Op 14-03-18 om 16:49 schreef Martijn Dekker: [...] > { > digits++; > result = (result * 8) + (*string++ - '0'); > - if (result > 0777) > + if (result > 07777) > return -1; > } > > By the way, why does that function repeatedly check the bounds for every > digit?
It just occurred to me that, given a huge number argument, this disallows the value to wrap around and return within the bounds. - M.