added typecast in mp_read_radix()

warning was "warning: subscript has type `char'"
This commit is contained in:
unknown 2010-12-19 14:02:42 +01:00
parent 5fc6314643
commit 1fd9163cac
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
* this allows numbers like 1AB and 1ab to represent the same value
* [e.g. in hex]
*/
ch = (char) ((radix < 36) ? toupper (*str) : *str);
ch = (char) ((radix < 36) ? toupper ((int)*str) : *str);
for (y = 0; y < 64; y++) {
if (ch == mp_s_rmap[y]) {
break;

View File

@ -6416,7 +6416,7 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
* this allows numbers like 1AB and 1ab to represent the same value
* [e.g. in hex]
*/
ch = (char) ((radix < 36) ? toupper (*str) : *str);
ch = (char) ((radix < 36) ? toupper ((int)*str) : *str);
for (y = 0; y < 64; y++) {
if (ch == mp_s_rmap[y]) {
break;