mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 10:36:30 +03:00
Fix wrong isdigit usage.
This commit is contained in:
@@ -518,11 +518,10 @@ Ftp::Response Ftp::DataChannel::setup( Ftp::TransferMode mode ) {
|
||||
Uint8 data[6] = {0, 0, 0, 0, 0, 0};
|
||||
std::string str = response.getMessage().substr( begin );
|
||||
std::size_t index = 0;
|
||||
std::locale loc;
|
||||
|
||||
for ( int i = 0; i < 6; ++i ) {
|
||||
// Extract the current number
|
||||
while ( std::isdigit( str[index], loc ) ) {
|
||||
while ( std::isdigit( str[index] ) ) {
|
||||
data[i] = data[i] * 10 + ( str[index] - '0' );
|
||||
index++;
|
||||
}
|
||||
|
||||
@@ -494,10 +494,9 @@ void Http::Response::parse( const std::string& data ) {
|
||||
std::string version;
|
||||
|
||||
if ( in >> version ) {
|
||||
std::locale loc;
|
||||
if ( ( version.size() >= 8 ) && ( version[6] == '.' ) &&
|
||||
( String::toLower( version.substr( 0, 5 ) ) == "http/" ) &&
|
||||
std::isdigit( version[5], loc ) && std::isdigit( version[7], loc ) ) {
|
||||
std::isdigit( version[5] ) && std::isdigit( version[7] ) ) {
|
||||
mMajorVersion = version[5] - '0';
|
||||
mMinorVersion = version[7] - '0';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user