mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
tweak the last commit: when parsing peer-ids we don't want locales to postentially change the behavior of isalpha/isdigit/etc
This commit is contained in:
parent
a362df0a14
commit
e18414ad0b
2 changed files with 6 additions and 6 deletions
|
@ -36,9 +36,9 @@
|
|||
static int
|
||||
charint( char ch )
|
||||
{
|
||||
if( isdigit( ch ) ) return ch - '0';
|
||||
if( isupper( ch ) ) return 10 + ch - 'A';
|
||||
if( islower( ch ) ) return 36 + ch - 'a';
|
||||
if( '0' <= ch && ch <= '9' ) return ch - '0';
|
||||
if( 'A' <= ch && ch <= 'Z' ) return 10 + ch - 'A';
|
||||
if( 'a' <= ch && ch <= 'z' ) return 36 + ch - 'a';
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -841,9 +841,9 @@ generateKeyParam( char * msg, int len )
|
|||
static int
|
||||
is_rfc2396_alnum( char ch )
|
||||
{
|
||||
return ( (ch >= 'a' && ch <= 'z' )
|
||||
|| (ch >= 'A' && ch <= 'Z' )
|
||||
|| (ch >= '0' && ch <= '9' ) );
|
||||
return ( '0' <= ch && ch <= '9' )
|
||||
|| ( 'A' <= ch && ch <= 'Z' )
|
||||
|| ( 'a' <= ch && ch <= 'z' );
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue