util: speed up failure path of ByteToBase10