In atol - use hex instead of decimal when converting characters to numbers.
i.e. (char - 0x30) instead of (char - 48)