Fix buffer allocation in `to_str_radix`

This is what was causing the memory corruption.