qtest: fix hex2nib for capital characters

Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Sergey Fedorov 2014-05-27 16:15:20 +04:00 committed by Michael Tokarev
parent ef18c2f54e
commit 2a802aaf63

View File

@ -148,7 +148,7 @@ static int hex2nib(char ch)
} else if (ch >= 'a' && ch <= 'f') {
return 10 + (ch - 'a');
} else if (ch >= 'A' && ch <= 'F') {
return 10 + (ch - 'a');
return 10 + (ch - 'A');
} else {
return -1;
}