Open ruiidong opened 1 year ago
应该return ch-'0'才对吧?
int HttpRequest::ConvertHexToDec(char ch) {
// ConvertHexToDec is only called when processing hexadecimal
// so does not handle the situation
// where ch is not a hexadecimal character
if (ch >= '0' && ch <= '9') {
return ch - '0';
}
if (ch >= 'A' && ch <= 'F') {
return ch - 'A' + 10;
}
if (ch >= 'a' && ch <= 'f') {
return ch - 'a' + 10;
}
}
应该return ch-'0'才对吧?