Message ID | 20190912210509.19816-4-mhei@heimpold.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Various fixes for mmc-utils | expand |
diff --git a/lsmmc.c b/lsmmc.c index a53bc57..e64117c 100644 --- a/lsmmc.c +++ b/lsmmc.c @@ -386,9 +386,9 @@ char *to_binstr(char *hexstr) if (isdigit(*hexstr)) strcat(binstr, bindigits[*hexstr - '0']); else if (islower(*hexstr)) - strcat(binstr, bindigits[*hexstr - 'a']); + strcat(binstr, bindigits[*hexstr - 'a' + 10]); else - strcat(binstr, bindigits[*hexstr - 'A']); + strcat(binstr, bindigits[*hexstr - 'A' + 10]); hexstr++; }