Skip to content
Browse files

added typecast in mp_read_radix()

warning was "warning: subscript has type `char'"
  • Loading branch information...
1 parent 5fc6314 commit 1fd9163cac65121e2d8f9fd4984f71dce068b891 unknown committed Dec 19, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 bn_mp_read_radix.c
  2. +1 −1 pre_gen/mpi.c
View
2 bn_mp_read_radix.c
@@ -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
2 pre_gen/mpi.c
@@ -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;

0 comments on commit 1fd9163

Please sign in to comment.
Something went wrong with that request. Please try again.