radix convert: accept radix=0 for native digit radix (2^64)
This commit is contained in:
parent
0bcfd7a65a
commit
e7331b36ae
1 changed files with 7 additions and 3 deletions
|
@ -116,9 +116,13 @@ impl RadixProjection {
|
|||
if val == 0 {
|
||||
self.dst_digits.push(0);
|
||||
} else {
|
||||
while val > 0 {
|
||||
self.dst_digits.push(val % self.dst_radix);
|
||||
val /= self.dst_radix;
|
||||
if self.dst_radix == 0 {
|
||||
self.dst_digits.push(val);
|
||||
} else {
|
||||
while val > 0 {
|
||||
self.dst_digits.push(val % self.dst_radix);
|
||||
val /= self.dst_radix;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue