Merge branch 'gerdr/fix/mp_radix_size' into develop
This commit is contained in:
		
						commit
						63515f040f
					
				| @ -24,12 +24,6 @@ int mp_radix_size (mp_int * a, int radix, int *size) | ||||
| 
 | ||||
|   *size = 0; | ||||
| 
 | ||||
|   /* special case for binary */ | ||||
|   if (radix == 2) { | ||||
|     *size = mp_count_bits (a) + (a->sign == MP_NEG ? 1 : 0) + 1; | ||||
|     return MP_OKAY; | ||||
|   } | ||||
| 
 | ||||
|   /* make sure the radix is in range */ | ||||
|   if (radix < 2 || radix > 64) { | ||||
|     return MP_VAL; | ||||
| @ -40,6 +34,12 @@ int mp_radix_size (mp_int * a, int radix, int *size) | ||||
|     return MP_OKAY; | ||||
|   } | ||||
| 
 | ||||
|   /* special case for binary */ | ||||
|   if (radix == 2) { | ||||
|     *size = mp_count_bits (a) + (a->sign == MP_NEG ? 1 : 0) + 1; | ||||
|     return MP_OKAY; | ||||
|   } | ||||
| 
 | ||||
|   /* digs is the digit count */ | ||||
|   digs = 0; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user